--- id: coqpit-config version: "0.2.5" license: MIT license_treatment: permissive maintenance: active --- # coqpit-config — Simple (maybe too simple), light-weight config management through python data-classes. License: permissive · Maintenance: active · Downloads: 125.2K/mo ## What it is and what it does Coqpit-config is a configuration management library built on Python dataclasses that handles schema definition, validation, and serialization without external dependencies. It lets you define configuration schemas as dataclasses with type hints and default values, then serialize them to JSON, load them back, and override values from the command line. The library supports nested configurations, inheritance, and dynamic value checking through a check_values() method you can define on your config class. It's designed for machine learning workflows where you need to manage experiment configurations, hyperparameters, and dataset paths that change between runs. You can decompose large configs into nested dataclasses, validate field ranges and types, and easily swap parameters via command-line arguments without modifying code. The library intentionally avoids external dependencies beyond typing-extensions to keep your environment minimal. Use it for: - Define and validate ML experiment hyperparameters with type checking and default ranges. - Save and load training configurations to JSON files for reproducibility across runs. - Override configuration values from the command line for hyperparameter search without code changes. - Organize large configuration files into nested dataclasses for readability and maintainability. - Enforce consistent configuration schemas across different platforms or programming languages via JSON export. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Coqpit-config provides lightweight configuration management through Python dataclasses with JSON serialization, type checking, and command-line argument parsing. Yes. Coqpit-config is a lightweight, actively maintained solution for configuration management with no external dependencies beyond typing-extensions. It's well-suited for ML projects and any Python application needing structured, validated configs with JSON persistence and CLI override support. The MIT license and recent maintenance signal make it a low-risk choice. ## Install pip install coqpit-config uv add coqpit-config poetry add coqpit-config ## Installing coqpit-config Before you install: Low install friction with a single runtime dependency (typing-extensions). Active maintenance with recent commits and no known vulnerabilities. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions, suitable for both open-source and commercial projects. Quickstart: pip install coqpit-config from dataclasses import dataclass from coqpit import Coqpit @dataclass class MyConfig(Coqpit): val_a: int = 10 val_b: str = "example" config = MyConfig() config.save_json('config.json') config2 = MyConfig() config2.load_json('config.json') Requires Python 3.10 or later. Verify before relying: - Whether Union-typed fields in console arguments are truly unsupported or have workarounds. - Performance characteristics with deeply nested or very large configuration hierarchies. - Compatibility with dataclass features beyond basic field types and defaults. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 125.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python dataclass config management, json serialization configuration, command line argument parsing config, type checking configuration library, nested config inheritance, ml experiment hyperparameter config, lightweight config no dependencies, dataclass-config, ml-experiment-tracking, json-serialization [View on SkillFed](https://skillfed.io/packages/coqpit-config) · [View on PyPI](https://pypi.org/project/coqpit-config/)