News for hackers. Stuff that matters.
Re:Show HN: A faster way to prototype your APIs using OpenAP... by dvlx on Friday October 23, 2020 @09:43AM (#24869369)
Even easier with FastApi

https://fastapi.tiangolo.com/

Auto generates both interactive SwaggerUI and Redoc pages.

Can turn off before production deployment.

Re:Show HN: A faster way to prototype your APIs using OpenAP... by hardwaresofton on Friday October 23, 2020 @10:19PM (#24876394)
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/

Re:Show HN: A faster way to prototype your APIs using OpenAP... by mccolin on Friday October 23, 2020 @11:39AM (#24870634)
Seconded. FastAPI has been a boon for us in our project work and the auto-generated documentation is one of its very best features.
Re:Show HN: A faster way to prototype your APIs using OpenAP... by gtm1260 on Friday October 23, 2020 @12:12PM (#24871015)
Came here to say this, FastApi was my introduction to Swagger and now I love it!