Shared core library for DeepTempo AI SOC projects.
deeptempo-core provides common functionality used across DeepTempo projects:
- Configuration Management: Centralized configuration with file and environment support
- Database Layer: SQLAlchemy models and services for PostgreSQL
- Secrets Management: Secure secrets storage with multiple backends
- Rate Limiting: Token bucket and rate limiter implementations
- Exception Handling: Common exception types
# Install from source (development)
pip install -e .
# Install from git
pip install git+https://github.com/YOUR_USERNAME/deeptempo-core.git# Configuration
from deeptempo_core.config import get_config_dir, is_demo_mode
# Database
from deeptempo_core.database.models import Finding, Case
from deeptempo_core.database.service import DatabaseService
from deeptempo_core.database.connection import get_db_manager
# Secrets
from deeptempo_core.secrets import get_secrets_manager
# Rate Limiting
from deeptempo_core.rate_limit import RateLimiter, get_limiterThe library uses ~/.deeptempo/ for configuration files:
integrations_config.json- Integration settingsgeneral_config.json- General configuration.env- Secrets (if using file backend)
Set the database connection via environment variable:
export DATABASE_URL=postgresql://user:pass@localhost:5432/deeptempo_socOr use the POSTGRES_* environment variables:
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_DB=deeptempo_soc
export POSTGRES_USER=deeptempo
export POSTGRES_PASSWORD=your_password# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black deeptempo_core/
ruff check deeptempo_core/MIT License - see LICENSE file for details.