cfig


Namecfig JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/Steffo99/cfig
SummaryA configuration manager for Python
upload_time2023-06-06 17:51:01
maintainerStefano Pigozzi
docs_urlNone
authorStefano Pigozzi
requires_python>=3.9,<4.0
licenseMIT
keywords configuration config lazy environment envvars
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cfig

A configuration manager for Python 

\[ [**Example**](https://github.com/Steffo99/cfig/tree/main/cfig/sample) | [**Documentation**](https://cfig.readthedocs.io/) | [**PyPI**](https://pypi.org/project/cfig/) \]

```python
import cfig

config = cfig.Configuration()

@config.required()
def SECRET_KEY(val: str) -> str:
    """Secret string used to manage HTTP session tokens."""
    return val

if __name__ == "__main__":
    config.cli()
```

```python
from mypackage.mycfig import SECRET_KEY

print(f"My SECRET_KEY is: {SECRET_KEY}")
```

```console
$ python -m mypackage.mycfig
===== Configuration =====

SECRET_KEY    → Required, but not set.
Secret string used to manage HTTP session tokens.

===== End =====
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Steffo99/cfig",
    "name": "cfig",
    "maintainer": "Stefano Pigozzi",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "me@steffo.eu",
    "keywords": "configuration,config,lazy,environment,envvars",
    "author": "Stefano Pigozzi",
    "author_email": "me@steffo.eu",
    "download_url": "https://files.pythonhosted.org/packages/80/b7/5548aaa3d4bf1511a3080137409f7c1c8762d624aa4bbb813b7591b3689c/cfig-0.3.1.tar.gz",
    "platform": null,
    "description": "# cfig\n\nA configuration manager for Python \n\n\\[ [**Example**](https://github.com/Steffo99/cfig/tree/main/cfig/sample) | [**Documentation**](https://cfig.readthedocs.io/) | [**PyPI**](https://pypi.org/project/cfig/) \\]\n\n```python\nimport cfig\n\nconfig = cfig.Configuration()\n\n@config.required()\ndef SECRET_KEY(val: str) -> str:\n    \"\"\"Secret string used to manage HTTP session tokens.\"\"\"\n    return val\n\nif __name__ == \"__main__\":\n    config.cli()\n```\n\n```python\nfrom mypackage.mycfig import SECRET_KEY\n\nprint(f\"My SECRET_KEY is: {SECRET_KEY}\")\n```\n\n```console\n$ python -m mypackage.mycfig\n===== Configuration =====\n\nSECRET_KEY    \u2192 Required, but not set.\nSecret string used to manage HTTP session tokens.\n\n===== End =====\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A configuration manager for Python",
    "version": "0.3.1",
    "project_urls": {
        "Documentation": "https://cfig.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/Steffo99/cfig",
        "Repository": "https://github.com/Steffo99/cfig"
    },
    "split_keywords": [
        "configuration",
        "config",
        "lazy",
        "environment",
        "envvars"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d94e2a846d9208da88d989fc65b2171d6ddfed494c70cc1ea575dcedfafbb1e",
                "md5": "a36e34adc0a5a2c38a69744a373a668f",
                "sha256": "8c40d5d1e768677d5d7ef31f6a92d6997f04b3ee70a7b8f4621c03eed31cdd24"
            },
            "downloads": -1,
            "filename": "cfig-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a36e34adc0a5a2c38a69744a373a668f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 13727,
            "upload_time": "2023-06-06T17:50:59",
            "upload_time_iso_8601": "2023-06-06T17:50:59.546924Z",
            "url": "https://files.pythonhosted.org/packages/4d/94/e2a846d9208da88d989fc65b2171d6ddfed494c70cc1ea575dcedfafbb1e/cfig-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80b75548aaa3d4bf1511a3080137409f7c1c8762d624aa4bbb813b7591b3689c",
                "md5": "c75b587a2eb19bc58193bb821c9a5164",
                "sha256": "974058cc40762cb28d22801b738fe39fae8d020ef0bb00d7d3a9d840d8cb0786"
            },
            "downloads": -1,
            "filename": "cfig-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c75b587a2eb19bc58193bb821c9a5164",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 11557,
            "upload_time": "2023-06-06T17:51:01",
            "upload_time_iso_8601": "2023-06-06T17:51:01.655227Z",
            "url": "https://files.pythonhosted.org/packages/80/b7/5548aaa3d4bf1511a3080137409f7c1c8762d624aa4bbb813b7591b3689c/cfig-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-06 17:51:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Steffo99",
    "github_project": "cfig",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cfig"
}
        
Elapsed time: 0.90221s