4 ms·
Hey everyone! While working on a project that required OpenAPI docs across multiple frameworks, I got tired of maintaining separate solutions. I liked FastAPI’
by mr_Fatalyst 2y ago
Hey everyone!
While working on a project that required OpenAPI docs across multiple frameworks, I got tired of maintaining separate solutions. I liked FastAPI’s clean and intuitive routing, so I built FastOpenAPI, bringing a similar approach to other Python frameworks (Flask, Sanic, Falcon, Starlette, etc).
It's meant for developers who prefer FastAPI-style routing but need or want to use a different framework.
The project is still evolving, and I’d love any feedback or testing from the community!
- pamelafox 2y agoDoes the flask extra also support quart?
- pamelafox 2y agoAnd would it document a streaming API? (With transfer-encoding: chunked) The support for that in OpenAPI is still in progress, I believe.
- mr_Fatalyst 2y agoCurrently, FastOpenAPI doesn't provide built-in support specifically for documenting streaming APIs. As far as I'm aware, support for streaming (chunked responses) in the OpenAPI specification itself is still limited.
- mr_Fatalyst 2y agoYes, Quart is supported. The full list of frameworks is: Falcon, Flask, Quart, Sanic, Starlette, and Tornado. Looks like I accidentally missed Quart in some parts of the docs—my bad, apologies! It’s included in the examples.
- raylad 2y agoWhy no Django?
- mr_Fatalyst 2y agoHow I answered before, I started working on a router for DRF/Django integration, but Django's project structure made it surprisingly tricky to implement cleanly. I keep it in my mind.
- asabla 2y agofor someone that comes primarily from a .net background. This looks fantastic! Just one thing that I tried to find more information about is: are you suppose to rely on the prefix for specifying api version? Disclaimer: I'm on a phone while writing this, so I just might have missed something obvious other then that, kudos for releasing this package!
- mr_Fatalyst 2y agoIn the examples, I used prefixes to demonstrate API versioning, but you're not limited to this approach. Prefixes can be used for general route structuring as well (like grouping entities, etc.), not just for versioning. Personally, I prefer using router composition for flexible route organization. You can see a clear example of this with Flask here: https://github.com/mr-fatalyst/fastopenapi/tree/master/examples/flask https://github.com/mr-fatalyst/fastopenapi/tree/master/examp... In this example, routes are split into routers by entities, which are then grouped into an api_v1 router, and finally, this api_v1 router is added to the main router.
- samstave 2y ago[dead]
- infinghxsg 2y ago[dead]
- deleted 2y ago[deleted]
- fjdjshsh 2y agoIn what context do you need to maintain multiple frameworks? My use case for fastAPI is very specific (we only maintain APIs for ML models), so I'm curious to learn about this.
- odie5533 2y agoLegacy applications built with Flask and modern ones with FastAPI.