Metadata-Version: 2.1
Name: Configize
Version: 1.0.1
Summary: Load YAML configuration respecting XDG
Home-page: https://gitlab.com/aw1cks/Configize
Author: Alex Wicks
Author-email: alex@awicks.io
License: AGPLv3
Download-URL: https://gitlab.com/aw1cks/Configize
Keywords: xdg,config,configuration,library
Platform: linux
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
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: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: LICENSE.txt

# configize

Python library to find and fetch YAML configuration for a program, respecting the XDG base directory specification.

## Example

```python
from configize import configize


# This will use $XDG_CONFIG_HOME
# The following files will be searched for, and the first existing file will be used:
# (Note, NAME is populated from the class kwarg 'Name')
# - $XDG_CONFIG_HOME/NAME.yaml
# - $XDG_CONFIG_HOME/NAME.yml
# - $XDG_CONFIG_HOME/NAME/NAME.yaml
# - $XDG_CONFIG_HOME/NAME/NAME.yml
# - $XDG_CONFIG_HOME/NAME/config.yaml
# - $XDG_CONFIG_HOME/NAME/config.yml
c = configize(Name="myproject")

# Alternatively, if using a custom path instead of XDG:
c = configize(Name="myproject", Path="/etc/myproject")

# the path field contains a pathlib.Path object to the config file
print(c.path)

# the config field contains a deserialized dict from the YAML file contents
print(c.config)
```


