env-setup

Manage Python environment variables and secrets with pydantic-settings validation.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/bswrundquist/devtools --skill env-setup-bswrundquist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-setup
Source: https://github.com/bswrundquist/devtools/tree/main/src/devtools/templates/claude/user/.claude/skills/env-setup
Command: npx skills add https://github.com/bswrundquist/devtools --skill env-setup-bswrundquist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the complex and error-prone process of managing environment variables and secrets across different development, testing, and production environments.

Core Features & Use Cases

  • Centralized Configuration: Uses pydantic-settings for robust, validated configuration loading.
  • Environment Specificity: Supports .env files for local development and strategies for production secrets.
  • Testing Support: Provides clear patterns for testing configurations using pytest fixtures and monkeypatch.
  • Use Case: Ensure your application consistently uses the correct database URL and API keys whether it's running locally, in staging, or in production, preventing costly misconfigurations.

Quick Start

Use the env-setup skill to configure your application's settings using pydantic-settings and a .env file.

Frequently Asked Questions about env-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage environment variables and secrets across different Python environments?

Manage environment variables and secrets across Python environments by using `.env` files for local development and external services like AWS Secrets Manager for production. This approach ensures consistent database URLs and API keys from local to production.

What is the best way to validate environment configuration in Python?

Validate environment configuration in Python using `pydantic-settings`. It provides robust, centralized configuration loading, ensuring your application catches missing or invalid environment variables before runtime execution.

How do I test environment variable configuration using pytest?

Test environment variable configuration using `pytest` fixtures and `monkeypatch`. This allows you to safely override environment variables during test runs, ensuring your testing strategies remain isolated and predictable.

Does pydantic-settings work with AWS Secrets Manager for production secrets?

Yes, `pydantic-settings` supports production secrets management via AWS Secrets Manager. It allows you to load and validate configurations from external services, moving beyond local `.env` files for secure production deployments.

How do I set up environment-specific overrides for Python applications?

Set up environment-specific overrides by combining `.env` files for local development with environment variables for staging and production. This prevents costly misconfigurations by ensuring the correct settings load per environment.