This is a small module you can use to make using config files easy
Project description
Bored Config Parser
This is a small module you can use to make using config files easy
Example
A config like this:
general:
name: "test"
frequency: 22
targets:
- name: "t1"
size: "2G"
- name: "t2"
size: "1G"
can be easily used with the following code:
from typing import List
from config_parser import load_config
class General:
name: str
frequency: int
class Target:
name: str
size: str
@load_config("path/to/config.yaml")
class Config:
general: General
targets: List[Target]
print(Config.general.name)
for target in Config.targets:
print(target.name)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for bored-config-parser-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d4d0cbe02a73ecf5b8dffa06e35bd507b4b54e1a9c2ee3b4c6386b29115e3cc |
|
MD5 | 705ccd7e309aabd3ed49fa396b9305a8 |
|
BLAKE2b-256 | 8365ba1eba29b284313851a2e417dc7ed778e1fc5a946d832f9d0b8a48225e4c |
Close
Hashes for bored_config_parser-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f416084d98542f11b52a8d4551b51f1158db3db2c1e5e761d5b59fea5a82b8c0 |
|
MD5 | 685996a011b73348f193022261378649 |
|
BLAKE2b-256 | cd1683efc40fa9990d3259ff46af32262ecbc520a49de0d9954eee79fe3ed8cf |