Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qpyconf

ci coverage

qpyconf is a small configuration helper built on top of:

  • dynaconf for loading and layering settings from files + environment variables
  • pydantic for validating and converting settings into typed models

It supports:

  • .env files (via Dynaconf load_dotenv)
  • settings.toml (and other Dynaconf-supported formats like JSON/YAML/INI)
  • Dynaconf environments (e.g. [default], [test]) with runtime switching

Docs:

Install

uv add qpyconf
pip install qpyconf

Quickstart

Create a settings.toml:

[default]
key = "value"
databases = { default = { url = "postgresql+psycopg://postgres:changeit@127.0.0.1:5432/workspace" } }
pg_url = "postgresql+psycopg://postgres:changeit@127.0.0.1:5432/workspace"
pg_a_url = "postgresql+psycopg_async://postgres:changeit@127.0.0.1:5432/workspace"

[test]
key = "abc"
databases.default.url = "postgresql+psycopg_async://postgres:changeit@127.0.0.1:5432/workspace"

Read settings:

from qpyconf import settings

assert settings.key == "value"

More examples:

Development

uv sync
uv run ci

About

python simple configuration lib based on dynconf

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.