Metadata-Version: 2.1
Name: cfg-argparser
Version: 1.2.0.post1
Summary: A package designed to simplify configurable defaults from argparse.
Author-email: Zeptofine <zeptofine@gmail.com>
Project-URL: Homepage, https://github.com/zeptofine/cfg-argparser
Project-URL: Bug Tracker, https://github.com/zeptofine/cfg-argparser/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Provides-Extra: typer
License-File: LICENSE

# cfg_argparser 1.2.0

a config wrapper I made.

## Installation

```bash
# from pypi:
pip install cfg-argparser

# from github:
git clone "https://github.com/zeptofine/cfg-argparser"
cd cfg-argparser
pip install -e .

```

## Example

```python
from cfg_argparser import wrap_config, CfgDict

cfg = CfgDict("test.json")
@wrap_config(cfg)
def test_function(s: str, is_real: bool = True): # I'd advise only wrapping functions all having default methods
    return f"{s} is {'real' if is_real else 'fake'}"

if __name__ == "__main__":
  print(test_function("We"))
  cfg['s'] = "us"
  print(test_function()) # Linters hate him!
```

## Compatibilty

This was mainly tested on 3.9 and 3.10, but it should work from 3.6 onwards. i can't test earlier versions for some reason.
