You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

bored-config-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bored-config-parser

This is a small module you can use to make using config files easy

0.1.1
pipPyPI
Maintainers
1

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)

Keywords

yaml

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.