Skip to main content

Small Config Injection package

Project description

Config Injection

Unittest Static Badge PyPI - Python Version Poetry

A decorator for injecting config from files and other sources.

Example use-case:

# conf/config.yml
target_device: /path/to/device
n_runs: 12
use_gpu: false
from inject_config import inject_config
from start_simulation import start_simulation

@inject_config.from_yaml('conf/config.yml')
def run_simulation(sim_config: dict) -> dict:
    start_simulation(sim_config)

For more examples look at the tests :)

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

inject_config-1.0.3.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

inject_config-1.0.3-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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