Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/spacemanspiff2007/easyco

Easy Configuration with yaml files
https://github.com/spacemanspiff2007/easyco

Last synced: 23 days ago
JSON representation

Easy Configuration with yaml files

Awesome Lists containing this project

README

        

# EasyCo
[![Build Status](https://travis-ci.org/spacemanspiff2007/EasyCo.svg?branch=master)](https://travis-ci.org/spacemanspiff2007/EasyCo)
[![Documentation Status](https://readthedocs.org/projects/easyco/badge/?version=latest)](https://easyco.readthedocs.io/en/latest/?badge=latest)

_Easy Configuration with YAML files_

# Goal
The goal of **EasyCo** is to provide an **easy** way of **Co**nfiguration using YAML files for Python programs.
It can automatically create a default configuration from provided default values and will validate the provided data.

# Documentation
[The documentation can be found at here](https://easyco.readthedocs.io)

# Example

```python
from EasyCo import ConfigFile, ConfigContainer

class MyContainer(ConfigContainer):
SubValueA: int
SubValueB: int = 7

class MyConfigFile(ConfigFile):
ConfValueA: int = 5
ConfValueB: float = 5.5

sub_values = MyContainer()

cfg = MyConfigFile('test')
cfg.load()
```