Skip to content

Installation

Thomas Pollet edited this page Mar 8, 2026 · 7 revisions

Installation

Supported Python versions

Current packaging metadata requires Python >=3.10.

Source of truth:

Install from package

python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install safrs

Editable install from a clone

git clone https://github.com/thomaxxl/safrs
cd safrs
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .

Flask example dependencies

The core package install is enough for the basic Flask examples:

python examples/mini_app.py

If you want the broader example set:

pip install -r examples/requirements.txt

FastAPI example dependencies

The FastAPI examples require FastAPI and an ASGI server:

pip install "fastapi[standard]" uvicorn

You can then run:

python examples/mini_fastapi_app.py

Or:

python examples/demo_fastapi.py

Optional extras and packaging caveat

The current repository metadata is not perfectly aligned:

  • setup.py defines extras such as admin, db2api, and fastapi
  • pyproject.toml currently exposes only dev and test

Because of that mismatch, this wiki avoids over-promising about published extras. For the examples, prefer the explicit commands shown above.

Verify the install

Flask:

python examples/mini_app.py

Then open the API root and generated docs path shown by the example output.

FastAPI:

python examples/mini_fastapi_app.py

Then open:

  • http://127.0.0.1:8000/docs
  • http://127.0.0.1:8000/openapi.json
  • http://127.0.0.1:8000/swagger.json (compatibility alias in the example)

Where to go next

Clone this wiki locally