Hacker News new | ask | show | jobs
by dvlx 2069 days ago
Even easier with FastApi

https://fastapi.tiangolo.com/

Auto generates both interactive SwaggerUI and Redoc pages.

Can turn off before production deployment.

3 comments

This was a fantastic introduction to modern performant/typesafe python -- I had no idea FastAPI existed, and did not know about the projects it depends on, starlette[0] and pydantic[1].

Prior to today if I was starting a python project I probably would reach for PyPy + falcon/flask/django and go until I hit a limitation that required CPython, but with starlette/pydantic I'm more than happy to settle for NodeJS-like performance on CPython. And of course, the OpenAPI/Swagger support is an amazing feature, APIs shouldn't be built without it these days.

[0]: https://starlette.io/

[1]: https://pydantic-docs.helpmanual.io/

Seconded. FastAPI has been a boon for us in our project work and the auto-generated documentation is one of its very best features.
Came here to say this, FastApi was my introduction to Swagger and now I love it!