mirror of
https://github.com/jorisvink/kore
synced 2025-03-08 19:19:02 -05:00
Adding the hooks keyword with a dictionary attached to specify the relevant hooks will hook them for the given route. Eg: domain.route("/", self.index, methods=["get"], hooks={ "on_free": self.request_free } ) These are the same hooks available via a normal Kore route configuration.
Kore pgsql example.
This example demonstrates how one can use Kore state machines and the pgsql api to make fully asynchronous SQL queries.
Asynchronous in this case meaning, without interrupting a Kore worker its other clients their I/O or http requests.
Tons of comments inside on how everything works.
Run:
# kodev run