pydantic-multi-source-settings

Community

Centralize config: env, file, and remote.

Authordragonkid
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps applications acquire configuration from multiple sources with a clear precedence order: environment variables, .env files, and a remote configuration service, ensuring consistent, cached settings across the app.

Core Features & Use Cases

  • Multi-source precedence: Environment variables override remote defaults, with .env as a fallback.
  • Singleton settings: Provides a cached, single instance of the Settings model for the app lifecycle.
  • Remote integration: Supports remote config services (e.g., Apollo, Consul) via a model_validator hook to fetch missing values at startup.

Quick Start

Define a Settings class using BaseSettings, configure env_prefix and env_file, implement a loader to fetch missing values from the remote service, and call get_settings() to obtain the singleton.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: pydantic-multi-source-settings
Download link: https://github.com/dragonkid/dotfiles/archive/main.zip#pydantic-multi-source-settings

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.