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.2.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for inject_config-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b882b863c5905e1193e9bf4a7e430396c341f7385d8822deb5fc2169d3ae33e |
|
MD5 | 13a3162862089541560b93c1b1013e49 |
|
BLAKE2b-256 | b81590efad0e67be200e741ca264824b339709e1fc19e2aac6fae8eae187db34 |