Installation Guide
Prerequisites
Section titled “Prerequisites”- Python: 3.11, 3.12, 3.13, or 3.14 (including 3.13t/3.14t free-threaded builds)
- Rust: 1.85+ (only required if building from source)
Install via pip
Section titled “Install via pip”Install the official pre-compiled wheel package from PyPI:
pip install justapiTo install optional features (Pydantic v2, Jinja2, XML support):
pip install "justapi[full]"Install via uv (recommended)
Section titled “Install via uv (recommended)”uv is a fast Python package manager written in Rust. Install JustAPI with uv:
uv pip install justapiWith optional features:
uv pip install "justapi[full]"Run without Installing (via uvx)
Section titled “Run without Installing (via uvx)”uvx lets you run JustAPI CLI commands without a permanent install:
# Scaffold a new project (no install needed)uvx justapi create my_app
# Run the dev serveruvx justapi serve --reloadThis is ideal for CI pipelines, quick prototyping, and ephemeral environments.
Verify Installation
Section titled “Verify Installation”python -c "import justapi; print(justapi.__version__)"# Output: 2.0.8Install CLI Tooling (justapi-cli)
Section titled “Install CLI Tooling (justapi-cli)”The justapi CLI includes the project scaffolder, dev server with hot-reload, and database migration runner.
# Install from source (requires Rust 1.85+)cargo install justapi-cli
# Verifyjustapi --version# Output: justapi 2.0.8Docker
Section titled “Docker”Pull the official Docker image:
docker pull ghcr.io/justapi/justapi:latestOr build from the multi-stage Dockerfile in the repository root — the Dockerfile uses uv for fast, reproducible pip installs:
docker build -t justapi-app .docker run -p 8000:8000 justapi-appBuild from Source
Section titled “Build from Source”Clone the repository and build the native PyO3 bindings with maturin:
git clone https://github.com/swadhinbiswas/JustAPI.gitcd JustAPI
# Create a virtual environmentpython -m venv .venvsource .venv/bin/activate
# Build the Rust extensionmaturin develop --release --manifest-path crates/justapi-py/Cargo.toml
# Install Python dependenciespip install pydantic
# Build the CLI (optional)cargo install --path crates/justapi-cliBuild with Feature Flags
Section titled “Build with Feature Flags”# Enable TLS, compression, and OpenTelemetry supportmaturin develop --release -m crates/justapi-py/Cargo.toml --features tls,compression,opentelemetryPlatform-Specific Notes
Section titled “Platform-Specific Notes”Pre-built wheels are available for manylinux_2_28 (x86_64 and ARM64) and musllinux_1_2 (Alpine).
Required system packages:
# Debian/Ubuntuapt-get install libssl-dev pkg-config python3-dev
# Alpineapk add openssl-dev pkgconfig python3-dev rust cargoPre-built wheels available for x86_64 and ARM64 (Apple Silicon).
# Ensure you have Xcode Command Line Toolsxcode-select --installWindows
Section titled “Windows”Pre-built wheels available for x64. When building from source, install Visual Studio Build Tools with C++ support.
Troubleshooting
Section titled “Troubleshooting”pip install fails with build error
Section titled “pip install fails with build error”Ensure you have Rust installed. If you don’t need to build from source, try the pre-built wheel:
pip install --only-binary=justapi justapimaturin develop fails
Section titled “maturin develop fails”# Ensure you're in a virtual environmentpython -m venv .venvsource .venv/bin/activate
# Update pip and maturinpip install --upgrade pip maturinImportError: No module named _justapi
Section titled “ImportError: No module named _justapi”The Rust extension wasn’t built. Run maturin develop --release from the repository root.
Next Steps
Section titled “Next Steps”- First Steps — Build your first API endpoint in 2 minutes
- CLI Project Scaffolder — Generate complete project templates