Metadata-Version: 2.3
Name: pyconfman2
Version: 0.1.9
Summary: A python package for managing YAML configuration
Project-URL: Homepage, https://github.com/PhillypHenning/python-config-parser
Project-URL: Issues, https://github.com/PhillypHenning/python-config-parser/issues
Author-email: Phillyp Henning <phillyp.henning@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: pyyaml
Description-Content-Type: text/markdown

# pyconfman2

pyconfman2 is designed to handle schema configurations by loading properties from a dictionary or a YAML configuration file. It provides methods for adding, getting, and removing properties from the schema.

## Installation
```bash
python -m pip install pyconfman2
```

## Usage

### Basic
In it's most basic form, a Schema can be created which will load a local "config.yaml" or "config.yml" file present.

```python
>>> from pyconfman2 import Schema
>>> config = Schema.ConfigSchema()
>>> print(config)
{}
```

### Provide a default config
```python
>>> from pyconfman2 import Schema
>>> config=Schema.ConfigSchema({"foo": "bar"})
>>> print(config)
{'foo': 'bar'}
```

### Specify the default config file to load
```python
>>> from pyconfman2 import Schema
>>> config=Schema.ConfigSchema(default_config="default_config.yaml")
>>> print(config)
{'foo': 'bar', 'zoo': {'jar': ['car', 'far']}}
```


### Specify the config file to load
```python
>>> from pyconfman2 import Schema
>>> config=Schema.ConfigSchema(default_config="default_config.yaml", filepath="another_config.yaml")
>>> print(config)
{'foo': 'overwritten_by_another_config', 'zoo': {'jar': ['car', 'far']}}
```


## Schema Loading breakdown
1. Load the hard-coded defaults
2. Load (and override) using the "default config" file if present
3. Load (and override) using the config file if present
