Metadata-Version: 2.4
Name: yaucl
Version: 0.1.0
Summary: yet another user config library...
Project-URL: Homepage, https://github.com/djetelina/yaucl
Project-URL: Documentation, https://djetelina.github.io/yaucl
Project-URL: Repository, https://github.com/djetelina/yaucl
Project-URL: Changelog, https://github.com/djetelina/yaucl/blob/main/CHANGELOG.md
Author: David Jetelina
License-Expression: MIT
License-File: LICENSE
Keywords: conf,config,env,toml,user,userconfig,xdg
Requires-Python: >=3.10
Requires-Dist: platformdirs>=4.3.8
Requires-Dist: tomli>=2.2.1; python_full_version < '3.11'
Requires-Dist: typing-extensions>=4.13.2; python_full_version < '3.11'
Description-Content-Type: text/markdown

# yaucl

[![PyPI - Version](https://img.shields.io/pypi/v/yaucl)](https://pypi.org/project/yaucl/)
![PyPI - License](https://img.shields.io/pypi/l/yaucl)
![PyPI - Downloads](https://img.shields.io/pypi/dm/yaucl)
![GitHub Repo stars](https://img.shields.io/github/stars/DJetelina/yaucl?style=flat&logo=github)
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://djetelina.github.io/yaucl)

...so I decided to create `yet another user config library`.

yaucl aims to provide easy-to-use and trivial to implement configuration
for your user-installed applications (such as CLIs, GUIs, TUIs, etc.).

If you need a complicated configuration handling, this might not be the correct library for you.

## Installation

```shell
$ uv add yaucl
```

Or pip, pipenv, poetry, whatever you prefer.

## Why yaucl

- Dataclass-first design
- Full type hint support
- Opinionated defaults
- No runtime template definitions needed
- TOML

### Alternatives

- User config: [confuse](https://pypi.org/project/confuse/)
- Deployed apps: [dynaconf](https://pypi.org/project/dynaconf/)

## The workflow

- Define dataclasses with your default configuration
- Make sure those dataclasses inherit yaucl base classes
- Init the config and then do whatever you want (singleton, passing in arguments...)

## Supported configuration methods

At the moment, yaucl supports [TOML](https://toml.io/en/) and Environmental Variables
as sources for the configuration. While this is extensible (both in yaucl and DIY),
the defaults will probably not change. 

Out of the box, you set the defaults; then a config file can overwrite that, 
and finally, environmental variables have the last say.
