# ============================================================================ # PRODUCTION REQUIREMENTS - Call Analytics Dashboard # ============================================================================ # Last Updated: 2025-12-23 # Python Version: 3.10+ # # This file contains all dependencies required to run the Call Analytics # Dashboard in production, including transcription, analysis, and API services. # ============================================================================ # ---------------------------------------------------------------------------- # Core Web Framework # ---------------------------------------------------------------------------- Flask==2.3.3 flask-cors==6.0.1 Werkzeug==2.3.7 fastapi==0.115.2 uvicorn==0.32.0 pydantic==2.9.2 python-multipart==0.0.12 pypdf==5.1.0 # ---------------------------------------------------------------------------- # Environment & Configuration # ---------------------------------------------------------------------------- python-dotenv==1.0.0 python-dateutil==2.8.2 # ---------------------------------------------------------------------------- # Database Drivers # ---------------------------------------------------------------------------- PyMySQL==1.1.0 cryptography==46.0.3 # Required for PyMySQL secure connections mysql-connector-python==8.2.0 # Alternative MySQL connector (optional) # ---------------------------------------------------------------------------- # AWS Services (Bedrock AI, S3, etc.) # ---------------------------------------------------------------------------- boto3==1.28.85 botocore==1.31.85 # ---------------------------------------------------------------------------- # AI/LLM Services # ---------------------------------------------------------------------------- anthropic==0.75.0 # Claude API (if using Anthropic directly) # ---------------------------------------------------------------------------- # HTTP Clients & APIs # ---------------------------------------------------------------------------- requests==2.31.0 urllib3==2.0.7 # ---------------------------------------------------------------------------- # Spreadsheet Import # ---------------------------------------------------------------------------- openpyxl==3.1.5 # ---------------------------------------------------------------------------- # Audio Processing (for transcription & duration extraction) # ---------------------------------------------------------------------------- librosa==0.11.0 # Audio analysis and duration extraction soundfile==0.13.1 # Audio file I/O audioread==3.1.0 # Audio file decoding numpy==1.26.3 # Required by librosa scipy==1.15.3 # Scientific computing (librosa dependency) scikit-learn==1.7.2 # Machine learning (librosa dependency) numba==0.63.1 # JIT compiler for numeric code joblib==1.5.2 # Parallel processing resampy==0.4.2 # Audio resampling packaging==21.3 # Version handling # ---------------------------------------------------------------------------- # Message Queue (for async processing) # ---------------------------------------------------------------------------- pika==1.3.2 # RabbitMQ client for job queuing # ---------------------------------------------------------------------------- # Production WSGI Server # ---------------------------------------------------------------------------- gunicorn==21.2.0 # Production HTTP server gevent==25.9.1 # Async workers for gunicorn # ---------------------------------------------------------------------------- # Production Optimization (Optional but Recommended) # ---------------------------------------------------------------------------- # Caching # MySQL-backed caching is used for sync cache and customer profiling paths. # Rate Limiting Flask-Limiter==3.5.0 # Monitoring & Logging sentry-sdk==1.39.2 # Error tracking python-json-logger==2.0.7 # Structured logging # ---------------------------------------------------------------------------- # Security & Authentication (Production Recommended) # ---------------------------------------------------------------------------- # Flask-JWT-Extended==4.6.0 # JWT authentication (if needed) # Flask-Talisman==1.1.0 # HTTPS enforcement # python-jose==3.3.0 # JWT token handling # ---------------------------------------------------------------------------- # Development & Testing (Comment out for production) # ---------------------------------------------------------------------------- # pytest==7.4.3 # pytest-flask==1.3.0 # pytest-cov==4.1.0 # black==23.12.1 # Code formatting # flake8==7.0.0 # Code linting # mypy==1.8.0 # Type checking # ---------------------------------------------------------------------------- # API Documentation (Optional) # ---------------------------------------------------------------------------- # flask-swagger-ui==4.11.1 # flasgger==0.9.7.1 # ============================================================================ # INSTALLATION INSTRUCTIONS # ============================================================================ # # 1. Create virtual environment: # python3 -m venv venv # source venv/bin/activate # Linux/Mac # venv\Scripts\activate # Windows # # 2. Install dependencies: # pip install -r requirements.txt # # 3. Set up environment variables (.env file): # DB_HOST=127.0.0.1 # DB_PORT=3306 # DB_USER=admin # DB_PASSWORD=your_password # DB_NAME=voicebot_cluster # AWS_ACCESS_KEY_ID=your_key # AWS_SECRET_ACCESS_KEY=your_secret # AWS_DEFAULT_REGION=us-east-1 # ANTHROPIC_API_KEY=your_key (if using Anthropic) # DEEPGRAM_API_KEY=your_key (if using Deepgram) # SARVAM_SUBSCRIPTION_KEY=your_key (if using Sarvam) # # 4. Run in production: # gunicorn -w 4 -k gevent --bind 0.0.0.0:8001 app:app # # ============================================================================ # PRODUCTION DEPLOYMENT CHECKLIST # ============================================================================ # # [ ] Set up reverse proxy (Nginx/Apache) # [ ] Configure SSL certificates # [ ] Set up database connection pooling # [ ] Validate MySQL call_sync_cache table retention policy # [ ] Configure log rotation # [ ] Set up monitoring (Sentry, CloudWatch, etc.) # [ ] Configure CORS for production domains only # [ ] Enable rate limiting # [ ] Set up automated backups # [ ] Configure health check endpoints # [ ] Set up CI/CD pipeline # [ ] Review and harden security settings # [ ] Set DEBUG=False in production # [ ] Use environment-specific .env files # # ============================================================================ # SYSTEM DEPENDENCIES (Install via apt/yum) # ============================================================================ # # Ubuntu/Debian: # sudo apt-get update # sudo apt-get install -y \ # python3-dev \ # build-essential \ # libmysqlclient-dev \ # libssl-dev \ # libffi-dev \ # portaudio19-dev \ # ffmpeg \ # libsndfile1 # # CentOS/RHEL: # sudo yum install -y \ # python3-devel \ # gcc \ # gcc-c++ \ # make \ # mysql-devel \ # openssl-devel \ # libffi-devel \ # portaudio-devel \ # ffmpeg \ # libsndfile # # ============================================================================ # NOTES # ============================================================================ # # - Pin versions to ensure reproducible builds # - Update regularly for security patches # - Test thoroughly before deploying updates # - Keep dev dependencies separate # - Use requirements-dev.txt for development-only packages # - Monitor dependency vulnerabilities with `pip-audit` # # ============================================================================ bcrypt PyJWT