Type-safe configuration manager for Python projects using descriptors and ConfigParser.
Full documentation: confkit docs
confkit follows the Python version support policy as outlined in the Python Developer's Guide:
- We support all active and maintenance releases of Python, starting with 3.11
- End-of-life (EOL) Python versions are not supported
- We aim to support Python release candidates to stay ahead of the release cycle
This ensures that confkit remains compatible with current Python versions while allowing us to leverage modern language features.
confkit is a Python library that provides type-safe configuration management with automatic type conversion and validation. It uses descriptors to define configuration values as class attributes that automatically read from and write to INI files.
- Type-safe configuration with automatic type conversion
- Automatic INI file management
- Default value handling with file persistence
- Optional value support
- Enum support (Enum, StrEnum, IntEnum, IntFlag)
- Method decorators for injecting configuration values
- Runtime type validation
For full quickstart, advanced patterns (custom data types, decorators, argparse integration), and runnable examples, visit the documentation site:
Direct entry points:
- Quickstart & descriptor patterns: Usage Guide
- All examples: Examples Overview
- Custom datatype tutorial: Custom Data Type example
- API reference: pdoc-generated symbol index
You can still browse example source locally under examples/.
- Fork the repository and clone locally
- Install dependencies:
uv sync --group test - Run tests:
pytest . - Run linting:
ruff check . - Make changes following existing patterns
- Add tests for new functionality
- Submit a pull request
git clone https://github.com/HEROgold/confkit.git
cd confkit
uv sync --group test
pytest .
ruff check .To build and preview documentation locally:
# Install documentation dependencies
uv sync --group docs
# Generate API documentation with pdoc
uv run pdoc confkit -o docs/api
# Build documentation site with mkdocs
uv run mkdocs build -d site
# Or serve locally for live preview (with auto-reload)
uv run mkdocs serveDocumentation is automatically built and deployed to GitHub Pages when changes are pushed to the master branch.
After updating code that affects documentation:
- Update relevant
.mdfiles indocs/directory (examples, reference, etc.) - Run
uv run pdoc confkit -o docs/apito regenerate API documentation - Preview changes with
uv run mkdocs serveand verify athttp://127.0.0.1:8000 - Commit both code and documentation changes together