-
Notifications
You must be signed in to change notification settings - Fork 73
Home
Thomas Pollet edited this page Mar 9, 2026
·
28 revisions
SAFRS exposes SQLAlchemy models as a JSON:API service and generates API documentation for the exposed resources.
- Applies to: Flask and FastAPI
- Simple examples:
examples/mini_app.py,examples/mini_fastapi_app.py - Related pages: Installation, Quickstart (Flask), Quickstart (FastAPI), Examples
- Start with Quickstart (Flask) if you want to use Flask.
- Start with Quickstart (FastAPI) if you want the experimental FastAPI adapter and FastAPI-native docs.
- JSON:API Basics for the endpoint model SAFRS creates for each exposed resource.
-
Relationships and Includes for relationship URLs,
include, and hidden relationships. -
Filtering for
filter[attribute], JSONfilter=..., and customization hooks. -
Sorting, Pagination, and Sparse Fieldsets for
sort,page[...],fields[...], andexclude. - Content Types and Errors for JSON:API media types, error envelopes, and common status codes.
- Bulk Requests for collection requests that send multiple resource objects in one payload.
- Customization is the hub page for serialization, methods, decorators, docs generation, and configuration.
-
RPC / Custom Methods covers
@jsonapi_rpcmethods. - Security and Access Control covers decorators, permission hooks, and auth-related examples.
- Stateless Endpoints / JABase
- Performance
- Existing Databases (Legacy)
- Docker / Deployment
- Troubleshooting
- Flask is still the main documented path and the reference behavior.
- FastAPI support exists in the repository and is documented here, but it should still be treated as experimental unless the maintainer says otherwise.
- Home
- Installation
- Quickstart (Flask)
- Quickstart (FastAPI)
- JSON:API Basics
- Relationships and Includes
- Filtering
- Sorting, Pagination, and Sparse Fieldsets
- Content Types and Errors
- Bulk Requests
- RPC / Custom Methods
- Customization
- Security and Access Control
- Stateless Endpoints / JABase
- Performance
- Examples
- Existing Databases (Legacy)
- PostGIS / GeoAlchemy2
- Docker / Deployment
- Troubleshooting
- Reference: SAFRSBase
- Reference: SAFRSBase Customization