Small Config Injection package
Project description
Config Injection
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
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
inject_config-1.0.3.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for inject_config-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3d028445375df3bc3c8290e9898ec84cc9e943fcca17faca2eb79250db2572 |
|
MD5 | 686e4f11b62ba3ebef079f0408c34f07 |
|
BLAKE2b-256 | 62885ace10f9d6845adca716fc543aa21db080f2576df3cada6a412145304f14 |