cfig (0.3.10)

Published 2025-11-14 04:43:22 +01:00 by Steffo in steffo/cfig

Installation

pip install --index-url  cfig

About this package

A configuration manager for Python

Cfig

Configuration helper for Python

Example

import cfig

config = cfig.Configuration()

@config.required()
def MAX_USERS(val: str) -> int:
    """The maximum number of users that will be able to login to this application."""
    try:
        return int(val)
    except (ValueError, TypeError):
        raise cfig.InvalidValueError("Not an int.")

if __name__ == "__main__":
    config.cli()
$ python -m myproject.mydefinitionmodule
===== Configuration =====

MAX_USERS       → Required, but not set.
The maximum number of users that will be able to login to this application.

===== End =====

See the quickstart guide for more information.

Why?

To make containerizing applications less of a pain.

Tools

Written in Python Prose with Sphinx Testing with pytest

Packaging

Available on PyPI Available on Forgejo Packages

Documentation

Documentation available Licensed under MIT license

Development

Code repository Releases Issues Pull requests

Requirements

Requires Python: >=3.11,<4.0
Details
PyPI
2025-11-14 04:43:22 +01:00
15
Stefano Pigozzi
25 KiB
Assets (2)
Versions (7) View all
0.3.10 2025-11-14
0.3.9 2025-10-06
0.3.8 2025-10-06
0.3.7 2025-10-05
0.3.4 2025-10-01