Releases: kalaspuff/tomodachi
Releases · kalaspuff/tomodachi
0.16.1
0.16.0
- 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
0.15.0
message_middleware
will now receive four arguments instead of the earlier three.func: Callable, service: Any, message: Any, topic: str
for SNS andfunc: 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
andamqp_publish
functions and will be forwarded to themessage_protocol
build_message
function.
0.14.8
- 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
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
0.14.5
0.14.4
- 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.