top | item 39522142

(no title)

mands | 2 years ago

Cool to see this here, using Litestar for a new project having selected and used Django/DRF company-wide in the past. I find it provides a modern "batteries-included" stack for Python, not quite as comprehensive as Django, but also not as minimal as Flask or FastAPI. For me, the advantages over Django include typing, async-first, websocket-support, along with integrations with existing projects (including Pydantic, SQLAlchemy, Jinja, OpenAPI). The higher bus-factor and release cadence was also a factor in choosing it over FastAPI.

Currently using with the following,

- [SAQ](https://saq-py.readthedocs.io/en/latest/) for background workers

- [Nginx Unit](https://unit.nginx.org/) for deployment

- [Orval](https://orval.dev/) to generate FE definitions based on the API spec.

For non-API/SPA use-cases, there are Jinja and HTMX integrations. The docs (https://docs.litestar.dev/latest/) are solid - not quite Django-tier but that's the gold standard, however the reference example is too complex imo (https://github.com/litestar-org/litestar-fullstack).

https://github.com/litestar-org/awesome-litestar has a list of useful extensions - highly recommend trying it out if you are starting a new Python web project.

discuss

order

NeutralForest|2 years ago

That's a very interesting stack, thanks for sharing!