
Python Configuration
Solid foundation for externalizing Python app configuration using pydantic-settings and environment variables. Sets up typed configuration classes that validate at startup and fail fast with clear error messages when required values are missing. Covers the essentials: structured settings with sensible local defaults, secret management, environment-specific behavior, and type coercion for booleans and lists. The nested configuration pattern using double underscores is clean for organizing complex apps. Most importantly, it enforces the twelve-factor principle of keeping config separate from code so you can deploy the same codebase across environments without modification.
- skills.sh installs
- 12K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill python-configuration --agent claude-codeInstalls into .claude/skills of the current project.
Files
Python Configuration Management
Externalize configuration from code using environment variables and typed settings. Well-managed configuration enables the same code to run in any environment without modification.
When to Use This Skill
- Setting up a new project's configuration system
- Migrating from hardcoded values to environment variables
- Implementing pydantic-settings for typed configuration
- Managing secrets and sensitive values
- Creating environment-specific settings (dev/staging/prod)
- Validating configuration at application startup
Core Concepts
1. Externalized Configuration
All environment-specific values (URLs, secrets, feature flags) come from environment variables, not code.
2. Typed Settings
Parse and validate configuration into typed objects at startup, not scattered throughout code.
3. Fail Fast
Validate all required configuration at application boot. Missing config should crash immediately with a clear message.
4. Sensible Defaults
Provide reasonable defaults for local development while requiring explicit values for sensitive settings.
Quick Start
Sponsors
Details
- Repository
- github.com/wshobson/agents
- Category
- Python
More from wshobson/agents
All 174- Cost Optimization11.9K
- Embedding Strategies11.8K
- Data Quality Frameworks11.7K
- Startup Metrics Framework11.7K
- Go Concurrency Patterns11.7K
- Prometheus Configuration11.6K
- Billing Automation11.6K
- K8s Manifest Generator11.6K
- Python Background Jobs11.6K
- Ml Pipeline Workflow11.5K
- Context Driven Development11.5K
- Dependency Upgrade11.5K
- Competitive Landscape11.5K
- Bats Testing Patterns11.4K
- Memory Forensics11.4K
- Risk Metrics Calculation11.4K
- Python Resource Management11.4K
- Binary Analysis Patterns11.4K
- Cqrs Implementation11.4K
- Workflow Patterns11.4K
- Incident Runbook Templates11.4K
- Airflow Dag Patterns11.3K
- Dbt Transformation Patterns11.3K
- Paypal Integration11.3K