3 ms·
Yes litestar have class based controllers since day one , class based views with HTMX/Jinja is also available in 2.0 which is now nearing release. Here is life
by v3ss0n 3y ago
Yes litestar have class based controllers since day one , class based views with HTMX/Jinja is also available in 2.0 which is now nearing release.
Here is lifecycle management :
https://docs.litestar.dev/2/usage/the-litestar-app.html#startup-and-shutdown https://docs.litestar.dev/2/usage/the-litestar-app.html#star...
app = Litestar(on_startup=[get_db_connection], on_shutdown=[close_db_connection])
We have quite powerful channels and event systems that goes along with websocket and realtime systems too.
Plus , if you use Repository + Sqlalchmey Plugin and DTO , you can also work with CRUD events before_update/after_update/before_insert/after_instet etc