Skip to content

Installation

System Requirements

  • Python 3.12 or higher
  • PostgreSQL database (see Quick Start for local setup)
  • Kubernetes cluster (for production deployment - see Deployment Guide)

Install Dependencies

The project uses uv for dependency management:

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install project dependencies
uv sync

Optional Dependencies

Development Tools

uv sync --extra dev

Documentation

uv sync --extra docs

Database Setup

For local development, see the Quick Start Guide which covers: - Running PostgreSQL with Docker - Setting the POSTGRES_URI environment variable

For production deployment with Kubernetes, see the Deployment Guide.

The database tables will be created automatically on first run using SQLAlchemy.

Verify Installation

Test your installation:

from tradingbot.utils.botclass import Bot
from tradingbot.utils.db import get_db_session

# Test database connection
with get_db_session() as session:
    print("Database connection successful!")

# Test bot creation
bot = Bot("TestBot", "QQQ")
print("Bot created successfully!")

Docker (Optional)

If you prefer Docker, build the image:

docker build -t tradingbot:latest .

Next Steps