1. 16
  1.  

  2. 2

    I’ve been using quart for an internal work project for over a year now and it’s really great. I previously used quart-openapi to provide OpenAPI functionality, but it’s great to hear that there is another solution out there that might require less boilerplate. Thanks @pgjones!

    1. 1

      See also FastAPI, which seems to be gaining a lot of traction and is pretty pleasant to use.

      Is there a production ready Flask + Pydantic + APISpec library doing the rounds? I’m a bit wary of by async by default, at least for the time being.

      1. 1

        I don’t understand your wariness; FastAPI is async by default being an ASGI framework built on Starlette. If it is the route handlers, Quart also allows for sync route handlers. Quart runs the sync route handlers on a thread executor - as I think FastAPI/Starlette does.

        I’m not aware of a Flask extension that works with Pydantic - although you can just strip out the async and await keywords from Quart-Schema and it will work with Flask (Quart is a re-implementation of Flask’s API using async/await).

        1. 1

          I’ve just been introduced to instant_api which may be similar enough to the Flask + Pydantic + APISpec library you are looking for.

        2. 1

          It sounds like you’ve arrived more-or-less at FastAPI, which I quite like for things like this. I just re-examined and updated my backend stack for a new project. I had been using turbogears until early this year, and initially found myself gravitating toward flask.

          About the time I started to add pydantic, I found FastAPI, and decided to just use that since I don’t have a pile of legacy concerns written against the flask API. I find it performs well, it’s very low-boilerplate, and I especially like the swagger/openapi docs that are generated by default. It’s an extremely pleasant way to build an API, and seems very similar to where you’ve landed.