pyfia.core.settings
Settings management for pyFIA using Pydantic Settings.
This module provides centralized configuration with environment variable support.
It is the canonical source for all pyFIA configuration.
Functions
get_default_db_path
- Path to the default database
get_default_engine
- Default engine type (“sqlite” or “duckdb”)
Classes
PyFIASettings
Central settings for pyFIA with environment variable support.
Environment variables are prefixed with PYFIA_.
For example: PYFIA_DATABASE_PATH, PYFIA_LOG_LEVEL
Also supports legacy environment variables FIA_DB_PATH and FIA_DB_ENGINE
for backwards compatibility.
Methods:
validate_engine
v: Database engine to validate
- Validated and lowercased engine name
validate_log_level
v: Log level to validate
- Validated and uppercased log level
validate_database_path
v: Database path to validate
- Validated database path
create_directories
Returns:
get_connection_string
- Database connection string for the configured engine