{"repo":"thomaxxl/safrs","free":true,"listed":false,"github":"https://github.com/thomaxxl/safrs","clone":"git clone https://github.com/thomaxxl/safrs.git","description":"SqlAlchemy Flask-Restful Swagger Json:API OpenAPI","language":"Python","stars":412,"topics":["json-api","swagger","json","sqlalchemy","flask-sqlalchemy","flask-restful","openapi3","openapi","flask","python3"],"license":"GPL-3.0","category":"api-integrations-sdks","readme_excerpt":"SAFRS Expose SQLAlchemy models as JSON:API resources and generate API documentation with minimal boilerplate. SAFRS is built around SQLAlchemy models and JSON:API-style resource handling, it includes FastAPI and Flask adapters. Check out the Live Demo ! Start here - Wiki home - Quickstart (Flask) - Quickstart (FastAPI) - Examples Functionality - JSON:API collection and instance endpoints for SQLAlchemy models - relationship endpoints and include support - filtering, sorting, pagination, sparse fieldsets, and bulk request support - custom RPC methods with @jsonapi rpc - generated Swagger / OpenAPI documentation - serialization hooks, computed attributes, and model-level customization - stateless service-style endpoints through JABase Install SAFRS currently requires Python =3.10 . Install from PyPI: Editable install from a clone: For the broader example set, including auth and admin examples: More setup details: Installation wiki page Quick start from this repository SAFRS models inherit both SAFRSBase and the SQLAlchemy model base. You then expose them with: - SafrsApi(...).expose object(Model) for Flask - SafrsFastAPI(...).expose object(Model) for the FastAPI adapter Run the smallest Flask example: Run the smallest FastAPI example: Quickstarts and walkthroughs: - Quickstart (Flask) - Quickstart (FastAPI) Example files worth opening first - examples/mini app.py — smallest Flask example - examples/demo relationship.py — relationships and includes - examples/mini fastapi app.py","default_branch":null,"files":null,"tree":[],"storefront":"/r/thomaxxl","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thomaxxl/safrs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}