Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bored-config-parser-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

bored_config_parser-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file bored-config-parser-0.1.1.tar.gz.

File metadata

  • Download URL: bored-config-parser-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

File hashes

Hashes for bored-config-parser-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8d4d0cbe02a73ecf5b8dffa06e35bd507b4b54e1a9c2ee3b4c6386b29115e3cc
MD5 705ccd7e309aabd3ed49fa396b9305a8
BLAKE2b-256 8365ba1eba29b284313851a2e417dc7ed778e1fc5a946d832f9d0b8a48225e4c

See more details on using hashes here.

File details

Details for the file bored_config_parser-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bored_config_parser-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f416084d98542f11b52a8d4551b51f1158db3db2c1e5e761d5b59fea5a82b8c0
MD5 685996a011b73348f193022261378649
BLAKE2b-256 cd1683efc40fa9990d3259ff46af32262ecbc520a49de0d9954eee79fe3ed8cf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page