Installation¶
This guide covers how to install PyCharter and its optional dependencies.
Requirements¶
- Python 3.11+ (3.12 or 3.13 recommended)
- pip or uv package manager
Quick Install¶
Core Library¶
The core library includes validation, contracts, and Pydantic generation:
With ETL Support¶
For ETL pipelines with cloud storage support:
This adds:
boto3- AWS S3 supportgoogle-cloud-storage- Google Cloud Storage supportazure-storage-blob- Azure Blob Storage supportsshtunnel- SSH tunnel for secure database connectionsopenpyxl- Excel file supportlxml- XML file support
With API Server¶
For the REST API server:
This adds:
fastapi- Web frameworkuvicorn- ASGI serverpydantic-settings- Settings management
With Web UI¶
For the interactive web interface:
With Streaming Support¶
For real-time streaming extractors (WebSocket, FileWatcher):
This adds:
websockets- WebSocket extractorwatchfiles- Efficient file system monitoring
With Messaging Support¶
For message queue extractors (Kafka, RabbitMQ):
pip install pycharter[messaging] # Kafka + RabbitMQ
pip install pycharter[kafka] # Kafka only
pip install pycharter[rabbitmq] # RabbitMQ only
This adds:
aiokafka- Apache Kafka consumeraio-pika- RabbitMQ consumer
Note
SQS support uses boto3, which is included in the [etl] extra.
Full Installation¶
Install everything:
Or pick specific extras:
Development Installation¶
For contributing to PyCharter:
# Clone the repository
git clone https://github.com/optophi/pycharter.git
cd pycharter
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with all dependencies
pip install -e ".[dev,api,ui,etl]"
# Run tests to verify installation
pytest
Database Setup¶
PyCharter supports multiple database backends for the metadata store:
SQLite (Default - No Setup Required)¶
from pycharter import SQLiteMetadataStore
store = SQLiteMetadataStore("pycharter.db")
store.connect()
PostgreSQL¶
- Install PostgreSQL and create a database:
- Install the PostgreSQL driver:
- Connect:
from pycharter import PostgresMetadataStore
store = PostgresMetadataStore("postgresql://user:pass@localhost/pycharter")
store.connect()
MongoDB¶
-
Install MongoDB and start the server
-
Install the MongoDB driver:
- Connect:
from pycharter import MongoDBMetadataStore
store = MongoDBMetadataStore("mongodb://localhost:27017/pycharter")
store.connect()
Redis¶
-
Install Redis and start the server
-
Install the Redis driver:
- Connect:
from pycharter import RedisMetadataStore
store = RedisMetadataStore("redis://localhost:6379/0")
store.connect()
Verify Installation¶
Run the following to verify your installation:
import pycharter
print(f"PyCharter version: {pycharter.__version__}")
# Test basic functionality
from pycharter import from_dict, validate
schema = {
"type": "object",
"version": "1.0.0",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"}
},
"required": ["name"]
}
Model = from_dict(schema, "TestModel")
result = validate(Model, {"name": "Test", "age": 25})
print(f"Validation passed: {result.is_valid}")
CLI Verification¶
After installation, the pycharter CLI should be available:
# Check version
pycharter --version
# Start API server (if [api] installed)
pycharter api
# Start UI development server (if [ui] installed)
pycharter ui serve
Troubleshooting¶
Import Errors¶
If you get import errors, ensure you have the correct optional dependencies:
# Check what's installed
pip show pycharter
# Reinstall with extras
pip install --upgrade pycharter[api,ui,etl]
Database Connection Issues¶
For PostgreSQL connection issues:
# Test connection
psql postgresql://user:pass@localhost/pycharter -c "SELECT 1"
# Check if psycopg2 is installed
python -c "import psycopg2; print('OK')"
Permission Errors¶
On macOS/Linux, you may need to use pip install --user or a virtual environment.
Next Steps¶
- Quick Start Guide - Run your first pipeline
- Core Concepts - Understand PyCharter's architecture
- ETL Tutorial - Build data pipelines