Hello,
up to today I’ve used BottlePy + psycopg2 for my website, but I’d like to move from that to Sanic + asyncpg.
Is there something equivalent to Vibora components (https://docs.vibora.io/initial#components), or bottlepy plugins (https://bottlepy.org/docs/dev/tutorial.html#plugins)?
I could just use middlewares, and add db and session to the request (a simple request.db = pgpool
) but since session has a bit of overhead (have to execute some queries) i would like to only pass it to the routes that need it.