--- id: prime-pydantic-config version: "0.4.2" license: unclear license_treatment: unclear maintenance: active --- # prime-pydantic-config — Pydantic-driven CLI with TOML/YAML config file support for ML License: unclear · Maintenance: active · Downloads: 344.2K/mo ## What it is and what it does prime-pydantic-config wraps Pydantic models to generate a CLI that accepts configuration from files (TOML, YAML, JSON) and command-line arguments, with file values as defaults and CLI args taking precedence. It handles nested config groups via dotted paths, boolean flags with negation, lists, dicts, optional sub-configs, discriminated unions, and validation aliases—all with auto-generated help text sourced from field descriptions and docstrings. The package is designed for ML training scripts and similar applications where configuration needs to be flexible, composable, and human-readable. It depends only on pydantic and offers optional extras for TOML and YAML parsing. The CLI is built directly from your Pydantic model definition, so no separate schema or argument parser code is needed. Use it for: - Configure ML training scripts with nested groups (model, data, optimizer) via CLI, TOML, or YAML files. - Load a base config from a file and override specific fields from the command line without re-specifying unchanged values. - Support multiple config variants (e.g., different optimizers) using discriminated unions, switchable by a CLI flag. - Migrate legacy config keys to new paths transparently using Pydantic validators, keeping old CLI flags working. - Generate self-documenting help text from Pydantic field descriptions and model docstrings without manual flag definitions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Builds a command-line interface from Pydantic models, loading and merging configuration from TOML, YAML, or JSON files with CLI argument overrides. Yes, with caution. The package solves a real problem—bridging Pydantic models and CLI/file-based config—with a clean API and low install friction. However, it is very new, has minimal adoption, and lacks a declared license. Use it for internal or experimental projects; verify the license and test thoroughly before production deployment. ## Install pip install prime-pydantic-config uv add prime-pydantic-config poetry add prime-pydantic-config ## Installing prime-pydantic-config Before you install: Low friction; pure Python wheel with only pydantic as a runtime dependency. Active maintenance with recent releases. License in practice: License status is unclear—no SPDX identifier or raw license text is available. Verify the repository's license before adopting in proprietary or restricted contexts. Quickstart: pip install prime-pydantic-config from prime_pydantic_config import cli, BaseConfig class Config(BaseConfig): lr: float = 1e-4 batch_size: int = 32 config = cli(Config) Requires Python >=3.10. Optional TOML and YAML support requires extras installation. Verify before relying: - Whether the package is production-ready given its recent first release and low repository star count. - Exact scope of TOML and YAML support and whether they require external dependencies when installed via extras. - Whether discriminated unions and validation aliases work as documented with all Pydantic versions. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 344.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pydantic cli config parser, toml yaml json config loader, command line argument pydantic, config file cli merge, nested config groups cli, pydantic basemodel cli, cli-builder, config-management, ml-training [View on SkillFed](https://skillfed.io/packages/prime-pydantic-config) · [View on PyPI](https://pypi.org/project/prime-pydantic-config/)