-
Notifications
You must be signed in to change notification settings - Fork 73
Installation
Thomas Pollet edited this page Mar 8, 2026
·
7 revisions
- Applies to: Flask and FastAPI
- Best examples:
examples/mini_app.py,examples/mini_fastapi_app.py - Related pages: Quickstart (Flask), Quickstart (FastAPI), Examples
Current packaging metadata requires Python >=3.10.
Source of truth:
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install safrsgit clone https://github.com/thomaxxl/safrs
cd safrs
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .The core package install is enough for the basic Flask examples:
python examples/mini_app.pyIf you want the broader example set:
pip install -r examples/requirements.txtThe FastAPI examples require FastAPI and an ASGI server:
pip install "fastapi[standard]" uvicornYou can then run:
python examples/mini_fastapi_app.pyOr:
python examples/demo_fastapi.pyThe current repository metadata is not perfectly aligned:
-
setup.pydefines extras such asadmin,db2api, andfastapi -
pyproject.tomlcurrently exposes onlydevandtest
Because of that mismatch, this wiki avoids over-promising about published extras. For the examples, prefer the explicit commands shown above.
Flask:
python examples/mini_app.pyThen open the API root and generated docs path shown by the example output.
FastAPI:
python examples/mini_fastapi_app.pyThen open:
http://127.0.0.1:8000/docshttp://127.0.0.1:8000/openapi.json-
http://127.0.0.1:8000/swagger.json(compatibility alias in the example)
- 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