Saphira Linux · an AKADATA project

Python and pip

Create virtual environments, install packages with pip, and run Flask, Django, or FastAPI on Saphira Linux.

Saphira, the Version 0 mascot
Technical preview

Saphira Linux

Saphira Linux has a home of its own

Saphira Linux is AKADATA’s source-built, musl/OpenRC server distribution for self-hosted infrastructure. Development, downloads, documentation, packages and the Dragon feature sets now live on the dedicated Saphira Linux website.

Visit Saphira Linux saphira.vm2.uk


Stack guide — Python

Python 3, pip, and virtual environments

Python 3 includes pip, setuptools, and packaging. The recommended workflow is to create a virtual environment for each application:

python3 -m venv /usr/local/venvs/myapp
source /usr/local/venvs/myapp/bin/activate
pip install flask gunicorn

The virtual environment isolates your application and its dependencies in /usr/local/venvs/myapp. Nothing touches the system Python installation. To deactivate:

deactivate

Useful packages for production servers:

  • Web frameworks: flask, django, fastapi, gunicorn, uvicorn
  • Data: pymysql (MariaDB), psycopg2 (compile separately for PostgreSQL)
  • Networking: requests, httpx, aiohttp
  • System: psutil, pyyaml, cryptography

pip installs packages into /usr/local. A virtual environment at /usr/local/venvs/myapp can be archived, moved to another Saphira machine, and activated. It runs without re‑installation because the Python interpreter and standard library are part of the Akadata base. Mount /usr/local from a separate volume or copy it between servers; where the Akadata base matches, the environment is usable as‑is.