Skip to content

Releases: kalaspuff/tomodachi

0.16.1

21 Mar 17:03
Compare
Choose a tag to compare
  • Bug fix for websocket handler function's signature inspection in middlewares, which caused the function signature to return a non-wrapped internal function.

0.16.0

07 Mar 20:14
Compare
Choose a tag to compare
  • Refactored all internal middleware functionality to use the same base function for executing middlewares.
  • A middleware context will be passed into the middlewares as the optional fifth argument, a dict that will live within the middleware excecution and may pass data along from middleware to middleware.

0.15.1

07 Mar 06:50
Compare
Choose a tag to compare
  • Middlewares first argument func: Callable will now be wrapped with the endpoint function, using @functools.wraps, so that signatures and keywords may be inspected and applied accordingly. [@0x1ee7]

0.15.0

27 Feb 09:22
Compare
Choose a tag to compare
  • message_middleware will now receive four arguments instead of the earlier three. func: Callable, service: Any, message: Any, topic: str for SNS and func: Callable, service: Any, message: Any, route_key: str for AMQP. If you are using middlewares for messaging you will most likely need to update these.
  • Additional kwargs may be passed into the aws_sns_sqs_publish and amqp_publish functions and will be forwarded to the message_protocol build_message function.

0.14.8

28 Jan 07:36
Compare
Choose a tag to compare
  • Fixes an issue when websockets were initiated together with an HTTP middleware applying additional arguments and keywords.
  • Sets the request._cache['is_websocket'] value before handing the processing off to the middleware.
  • Fixes a bug causing aiohttp.web.FileResponse return values to not show any content.

0.14.7

21 Jan 18:24
Compare
Choose a tag to compare

Added helper functions to be able to get the status code of a HTTP response or on a raised exception during a HTTP request. await tomodachi.get_http_response_status(value, request=request) or await tomodachi.get_http_response_status(exception, request=request).

0.14.6

14 Jan 12:02
Compare
Choose a tag to compare
  • Extended middleware functionality to also be available for event based messaging (AMQP and SNS+SQS) as message_middleware.

0.14.5

14 Jan 12:01
Compare
Choose a tag to compare
  • Added the support of middlewares to inject additional arguments and keywords arguments or overriding existing keyword arguments of the invoked function.

0.14.4

06 Jan 22:22
Compare
Choose a tag to compare
  • Service classes may now use http_middleware which is a list of functions to be run on all HTTP calls and may change the behaviour before or after the invoked function is called, either preventing the function from being called or modifying the response values. An example has been added to the examples directory.
  • The auto-reloader on code changes will now only reload if a the files content has actually changed and not when the file was written to disk without changes.

0.14.3

26 Dec 02:46
Compare
Choose a tag to compare
  • Added support for aiohttp 3.5.x.