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 Targets:
name: str
size: str
@load_config("path/to/config.yaml")
class Config:
general: General
targets: List[Targets]
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fceed7851e68b69548d74d4b1b1939f601bdd9e158c6a1bee52f0b8c4e2ad3b |
|
MD5 | 43957581d831ce047fa7807875d19062 |
|
BLAKE2b-256 | caa5cba3b7e82a9a7154dc4a4a2618fcb79fe95fd2e86475490d7d8261bc122d |
Close
Hashes for bored_config_parser-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31527a0778adf6bbf43dfc6669f76cfb2e04a7f7c5858fd27a6f03422d3b6c7d |
|
MD5 | 7a6106f449580e3c2b068fed436e3167 |
|
BLAKE2b-256 | dfb8494a832e32ff5bf82ee4f4a3014841b7201b07cf597648f3a92393cfb7e3 |