View on GitHub

TradeTrack

A modern CLI stock portfolio tracker with real-time data and beautiful displays

Dependencies and Requirements

This document provides detailed information about TradeTrack’s dependencies and requirements.

Table of Contents

System Requirements

Core Dependencies

Rich (>=14.1.0)

Purpose: Beautiful terminal displays and tables

yfinance (>=0.2.66)

Purpose: Real-time stock and cryptocurrency data

PyYAML (>=6.0)

Purpose: Configuration and portfolio file parsing

pandas (>=2.3.0)

Purpose: Data manipulation and analysis

termcolor (>=3.1.0)

Purpose: Terminal text coloring for columnar display

python-dotenv (>=1.1.0)

Purpose: Environment variable management

requests (>=2.32.0)

Purpose: HTTP requests (used by yfinance)

numpy (>=2.3.0)

Purpose: Numerical computing

columnar (>=1.4.0)

Purpose: Columnar table display

Installation

Basic Installation

pip install -r requirements.txt

Development Installation

# Install core dependencies

pip install -r requirements.txt

# Install development dependencies

pip install pytest black flake8 mypy
# Create virtual environment

python3 -m venv .venv

# Activate virtual environment

source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies

pip install -r requirements.txt

Version Compatibility

Python Version Support

Package Version Ranges

All packages use >= version constraints to ensure compatibility:

Optional Dependencies

Development Tools

# Testing

pytest>=7.0.0

# Code formatting

black>=23.0.0

# Linting

flake8>=6.0.0

# Type checking

mypy>=1.0.0

Enhanced Functionality

Troubleshooting Dependencies

Common Issues

  1. yfinance errors
    • Update to latest version: pip install --upgrade yfinance
    • Check internet connection
    • Verify symbol format (e.g., “AAPL”, “BTC-USD”)
  2. Rich display issues
    • Update Rich: pip install --upgrade rich
    • Check terminal compatibility
    • Try columnar mode: python ttrack.py -p crypto (without -b)
  3. Pandas warnings
    • Update pandas: pip install --upgrade pandas
    • Check data types in portfolio files
  4. YAML parsing errors
    • Validate YAML syntax in config and portfolio files
    • Check indentation (use spaces, not tabs)
    • Verify file encoding (UTF-8)

Platform-Specific Issues

Windows

macOS

Linux

Security Considerations

API Keys

Data Privacy

Package Security

Performance Considerations

Memory Usage

Network Usage

CPU Usage

Updating Dependencies

Check for Updates

pip list --outdated

Update All Dependencies

pip install --upgrade -r requirements.txt

Update Specific Package

pip install --upgrade package_name

Pin Versions (Production)

For production deployments, consider pinning exact versions:

rich==14.1.0
yfinance==0.2.66
pandas==2.3.3

Contributing

When adding new dependencies:

  1. Add to requirements.txt with appropriate version constraint
  2. Update this documentation
  3. Test on multiple Python versions
  4. Consider security implications
  5. Document the purpose and usage