r/FastAPI • u/Thomaxxl • Mar 09 '26
pip package SAFRS FastAPI Integration
I’ve been maintaining SAFRS for several years. It’s a framework for exposing SQLAlchemy models as JSON:API resources and generating API documentation.
SAFRS predates FastAPI, and until now I hadn’t gotten around to integrating it. Over the last couple of weeks I finally added FastAPI support (thanks to codex), so SAFRS can now be used with FastAPI as well.
The repository contains some example apps (in the examples/ directory, eg. demo_fastapi.py)
8
Upvotes
View all comments
Show parent comment
1
u/Thomaxxl Mar 28 '26
I like pydantic and looked into automating it, but that didn't add much value here and it's s a bit of complexity overhead here. Also, safrs was created before pydantic and we had the serialization worked out already.
I don't understand your question though, how would the relationship loading interact with the lifespan?