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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file inject_config-1.0.3.tar.gz.

File metadata

  • Download URL: inject_config-1.0.3.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.2 Windows/10

File hashes

Hashes for inject_config-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4702df9a18442b54be71803bdcaede648582cee2b2e7669f56e218aea16e97fd
MD5 1cc94f49a7718cdca9c10419303b4e84
BLAKE2b-256 f65b2e26be4d1bf9ea76aeb128a2dffb1ac2374bb3fede9a441c6a75801f41bf

See more details on using hashes here.

File details

Details for the file inject_config-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: inject_config-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.2 Windows/10

File hashes

Hashes for inject_config-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 de3d028445375df3bc3c8290e9898ec84cc9e943fcca17faca2eb79250db2572
MD5 686e4f11b62ba3ebef079f0408c34f07
BLAKE2b-256 62885ace10f9d6845adca716fc543aa21db080f2576df3cada6a412145304f14

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