Docs / fastkit-core / Installation

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:

Python 3.11+
3.10 technically supported, 3.11+ recommended
pip
Included with Python 3.4+

Verify your Python version before proceeding:

bash
python --version
# or
python3 --version

Install via pip

bash
pip install fastkit-core

This installs FastKit Core along with its core dependencies:

PackageVersionPurpose
fastapi≥ 0.115The web framework
uvicorn≥ 0.34ASGI server
pydantic≥ 2.10Data validation
pydantic-settings≥ 2.6Settings management
sqlalchemy≥ 2.0.36Database ORM
python-dotenv≥ 1.0Environment 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.

bash
# 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.

bash
# 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.

bash
# Initialize project
poetry init

# Add FastKit Core
poetry add fastkit-core

Pipenv combines pip and virtualenv into one streamlined workflow.

bash
# 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:

PostgreSQL Recommended
bash
# Development
pip install psycopg2-binary

# Production (compiled)
pip install psycopg2
MySQL / MariaDB
bash
# Standard
pip install pymysql

# Better performance
pip install mysqlclient
SQLite Built-in

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:

bash
# 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:

bash
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:

python
# 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!")
bash
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:

txt
# requirements.txt
fastkit-core>=0.1.0,<1.0.0
psycopg2-binary>=2.9.0

Or with extras:

txt
fastkit-core[postgresql]>=0.1.0,<1.0.0

Docker

Using Docker? Here's a production-ready Dockerfile:

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:

bash
# 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

Import Error: No module named 'fastkit_core'

Make sure you're in the correct virtual environment:

bash
which python          # Check which Python is active
pip install --upgrade fastkit-core
SQLAlchemy Import Errors

Install a database driver for your target database:

bash
pip install psycopg2-binary   # PostgreSQL
pip install pymysql           # MySQL
Pydantic Validation Errors

FastKit Core requires Pydantic 2.10+. Upgrade if needed:

bash
pip install --upgrade pydantic

Still having issues? Search GitHub Issues or ask in GitHub Discussions.