skillfed

coqpit

Simple (maybe too simple), light-weight config management through python data-classes.

coqpit v0.0.17 101.2K downloads/30d#12,952 on PyPI1
License unclear DORMANT released

What it is and what it does

Coqpit is a lightweight configuration library built on Python dataclasses that lets you define structured configs with type hints, default values, and validation. It handles serialization to and from JSON, supports nested and inherited configurations, and can parse values from command-line arguments—useful for machine learning workflows where you need to swap parameters without changing code.

The package intentionally avoids external dependencies, relying only on the standard library's dataclasses module. It's designed for scenarios where you want a schema-driven config file that can be read by other programming languages via JSON, with built-in type checking and the ability to mark fields as mandatory or provide dynamic defaults. The library also supports pretty-printing configs and exporting them to dictionaries for programmatic access.

Use it for:

  • Define and validate ML training configs with typed fields, default values, and range constraints for hyperparameter experiments.
  • Save and load experiment configurations to JSON, then share or version-control them independently of code.
  • Override config values from the command line during training runs without modifying the source code or config files.
  • Organize large configs into nested dataclasses for dataset, preprocessing, and model parameters, keeping them maintainable.
  • Enforce that certain config fields are explicitly set before use, catching missing required values early.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Coqpit provides configuration management through Python dataclasses with JSON serialization, type checking, and command-line argument parsing, designed for machine learning projects that need portable, schema-driven configs.

Yes, if you need a minimal, dependency-free config system for ML projects and can tolerate dormant maintenance. The package is stable for its current scope—JSON serialization, nested configs, and CLI parsing work as documented. However, do not use it if you require active maintenance, ongoing Python version support, or a clear license statement. Verify the license in the repository before production use.

Install

coqpit on PyPI

pip

pip install coqpit

uv

uv add coqpit

poetry

poetry add coqpit

Installing coqpit

Before you install

Low install friction with only a standard library dependency (dataclasses). However, the package is dormant—last release was 2022-12-21 and no commits for 1332 days—so expect no active maintenance or bug fixes.

License in practice

License status is unclear; the package metadata contains no license declaration. Before using in production or distributing, verify the actual license terms in the repository.

Quickstart

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')
config.load_json('config.json')

Requires Python >=3.7.0.

Verify before relying

  • Whether the unclear license status has been resolved or clarified in the repository since the last release.
  • Whether the dormant status means the package is stable and complete, or abandoned and at risk of incompatibility with future Python versions.
  • Real-world adoption beyond the cited TTS project and whether active forks or maintained alternatives exist.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.7.0)
Install friction low — pure-Python wheel
Runtime dependencies 1 — dataclasses
Maintenance dormant — 1,332 days since the last release
Last repo commit
First released
Downloads 101,226/month — #12,952 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: coqpit-0.0.17-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3

Tags

dataclass config managementJSON config serializationcommand line argument parsingtype-checked configurationnested config inheritanceML experiment configno-dependency config library
config-managementdataclass-basedml-workflow

More Software Development packages