7305ad9ae64ce1103511f495f6c6f9978f2cdf85
Migrate FastAPI configuration from environment files (.env) to YAML using pydantic-yaml library for better readability and maintainability. Changes: - Add pydantic-yaml dependency - Create config/ module with Settings, SqlServerConfig classes - Add config/settings.yaml for database configuration - Update all imports from app.core.config to config.settings - Add error handling for config loading on startup - Remove old .env and app/core/config.py - Update README with YAML configuration documentation - Add test coverage for config loading Test results: - All 15 tests passing - 88% code coverage maintained Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CargoTrace FastAPI Backend
FastAPI backend service for the CargoTrace platform.
Getting Started
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# or .venv\Scripts\activate # Windows
pip install -r requirements.txt
uvicorn app.main:app --reload
Configuration
Configuration is managed via YAML files in the config/ directory.
Configuration File
Edit config/settings.yaml to configure your environment:
database:
sql_server:
host: your-host
port: 1433
database: your-database
username: your-username
password: your-password
Local Overrides
For local development, create config/settings.local.yaml to override specific values without committing them.
Description
Languages
Python
100%