Installation
Get FastKit Core installed and ready to use. Supports pip, uv, Poetry, and Pipenv — with optional database drivers for PostgreSQL, MySQL, and more.
Requirements
FastKit Core has minimal system requirements:
Verify your Python version before proceeding:
python --version
# or
python3 --version
Install via pip
pip install fastkit-core
This installs FastKit Core along with its core dependencies:
| Package | Version | Purpose |
|---|---|---|
fastapi | ≥ 0.115 | The web framework |
uvicorn | ≥ 0.34 | ASGI server |
pydantic | ≥ 2.10 | Data validation |
pydantic-settings | ≥ 2.6 | Settings management |
sqlalchemy | ≥ 2.0.36 | Database ORM |
python-dotenv | ≥ 1.0 | Environment variables |
Virtual Environment
We strongly recommend using a virtual environment to isolate your project dependencies. Choose the tool that fits your workflow:
uv is a fast Python package installer and resolver written in Rust — the recommended tool for FastKit projects.
# Install uv — macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install uv — Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Create virtual environment
uv venv
# Activate — Linux/macOS
source .venv/bin/activate
# Activate — Windows
.venv\Scripts\activate
# Install FastKit Core
uv add fastkit-core
Python's built-in virtual environment tool — no additional installation required.
# Create virtual environment
python -m venv venv
# Activate — Linux/macOS
source venv/bin/activate
# Activate — Windows
venv\Scripts\activate
# Install FastKit Core
pip install fastkit-core
Poetry provides dependency management and packaging in one tool.
# Initialize project
poetry init
# Add FastKit Core
poetry add fastkit-core
Pipenv combines pip and virtualenv into one streamlined workflow.
# Install FastKit Core
pipenv install fastkit-core
# Activate environment
pipenv shell
Database Drivers
FastKit Core includes SQLAlchemy but not database drivers. Install the driver for your database separately:
# Development
pip install psycopg2-binary
# Production (compiled)
pip install psycopg2
# Standard
pip install pymysql
# Better performance
pip install mysqlclient
SQLite support is built into Python — no additional installation needed. Perfect for development and testing.
Optional Dependencies
FastKit Core ships with extras that bundle the right drivers automatically:
# PostgreSQL — includes psycopg2-binary
pip install "fastkit-core[postgresql]"
# MySQL — includes pymysql and cryptography
pip install "fastkit-core[mysql]"
# All drivers
pip install "fastkit-core[full]"
# Development tools — testing, linting, docs
pip install "fastkit-core[dev]"
Verifying Installation
Confirm FastKit Core is installed correctly:
python -c "import fastkit_core; print(fastkit_core.__version__)"
# Expected output: 0.1.0
Quick Test
Create a test file to verify all modules load correctly:
# test_fastkit.py
from fastkit_core.config import ConfigManager
from fastkit_core.http import success_response
config = ConfigManager(modules=[], auto_load=False)
print("✓ Config module loaded")
response = success_response(data={"status": "working"})
print("✓ HTTP module loaded")
print("✓ FastKit Core is ready!")
python test_fastkit.py
# ✓ Config module loaded
# ✓ HTTP module loaded
# ✓ FastKit Core is ready!
requirements.txt
For reproducible deployments, pin FastKit Core in your requirements file:
# requirements.txt
fastkit-core>=0.1.0,<1.0.0
psycopg2-binary>=2.9.0
Or with extras:
fastkit-core[postgresql]>=0.1.0,<1.0.0
Docker
Using Docker? Here's a production-ready Dockerfile:
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
Upgrading
Keep FastKit Core up to date:
# Upgrade to latest version
pip install --upgrade fastkit-core
# Upgrade to specific version
pip install fastkit-core==0.2.0
Always check the Changelog before upgrading to a new major or minor version.
Troubleshooting
Make sure you're in the correct virtual environment:
which python # Check which Python is active
pip install --upgrade fastkit-core
Install a database driver for your target database:
pip install psycopg2-binary # PostgreSQL
pip install pymysql # MySQL
FastKit Core requires Pydantic 2.10+. Upgrade if needed:
pip install --upgrade pydantic
Still having issues? Search GitHub Issues or ask in GitHub Discussions.