
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
A lightweight configuration management library for Python applications with multiple sources, type validation, and automatic merging
A lightweight configuration management library for Python applications that supports multiple sources (YAML, environment variables, CLI arguments) with type validation and automatic merging.
msgspec
for robust type validation and serializationpip install config-lib
from config_lib.base import BaseConfig
class AppConfig(BaseConfig):
"""Main application configuration"""
host: str = "localhost"
port: int = 8080
debug: bool = False
config = AppConfig.load()
# config.yaml
host: "0.0.0.0"
port: 9000
os.environ["CFG_CONFIG"] = "config.yaml"
config = AppConfig.load() # Loads from YAML
export CFG_HOST="127.0.0.1"
export CFG_PORT=3000
python app.py --host 192.168.1.1 --port 4000
from msgspec import Struct
class DatabaseConfig(Struct):
host: str = "localhost"
port: int = 5432
class AppConfig(BaseConfig):
db: DatabaseConfig = DatabaseConfig()
cache_ttl: int = 300
Environment variables:
CFG_DB__HOST=postgres.example.com CFG_DB__PORT=6432
CLI arguments:
python app.py --db.host postgres.example.com --db.port 6432
The library provides:
msgspec
# Run tests
pytest tests/
# Check test coverage
pytest --cov=config_lib --cov-report=html
Contributions welcome! Please follow standard Python packaging practices and ensure all tests pass before submitting PRs.
MIT License. See LICENSE for details.
FAQs
A lightweight configuration management library for Python applications with multiple sources, type validation, and automatic merging
We found that config-lib-msgspec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.