Collection of helpers for building asyncio daemons.
Pillars is available on PyPI.
$ pip3 install pillars
import pillars
import aiohttp
app = pillars.Application(name="example")
http = pillars.transports.http.Application()
app.listen(
app=http,
name="http",
runner=aiohttp.web.AppRunner(http),
sites=(functools.partial(aiohttp.web.TCPSite, host="127.0.01", port=8080),),
)
http.router.add_route("GET", "/", hello_world)
async def hello_world(request):
return pillars.Response(status=200, data={"data": "Hello world"})
For more examples see the examples folder.
- Add on_connection callback to websocket site
- Add on_started signal
- Dependencies update
- Bugfix for json_encoder argument
- Add custom json encoder for UUID
- Add json_encoder argument to pillars.Response
- Fix ARI engine shutdown
- Properly close websocket connection
- Remove pg uuid encoder
- Log when pg jsonb encode fails
- Use aiohttp exception for ARI transports
- Initial release