Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.36 KB

README.rst

File metadata and controls

40 lines (28 loc) · 1.36 KB
tests Code style: Black https://img.shields.io/badge/skeleton-2021-informational

Deploying against Velociraptor? Need to load the config? It's easy:

parser = argparse.ArgumentParser()
yg.launch.cmdline.add_config_arg(parser)
# add your own custom args too
args = parser.parse_args()
startup_app(args.config)

This module loads the config from YAML into a nice ItemsAsAttributes dictionary, so you can get the config values as items or as attributes:

args.config.foo == args.config['foo']

Config is loaded using yamlenv <https://pypi.org/project/yamlenv/>, so any YAML can reference environment variables and other YAML files to be interpolated.

Enjoy!