No project description provided
Project description
Atro-Args
Python package that allows one to source arguments from command line arguments, environment variables, environment files and yaml files with overwritable prioritization and decent logging.
Installation
pip install -U atro-args
Usage
Suppose you want to obtain two variables app_name
and app_namespace
from cli inputs and environment variables. You can do the following:
from atro_args import Arg, InputArgs
input_args = InputArgs(prefix="ATRO_TEST")
input_args.add_arg(Arg(name="app_name", arg_type=str, help="App name", required=True))
input_args.add_arg(Arg(name="app_namespace", arg_type=str, help="App name", required=True))
model = input_args.parse_args()
The following model will be a dictionary dict
which will contain both app_name
and app_namespace
as keys with their respective values.
For more examples and more explanations please refer to the documentation.
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
atro_args-0.2.2.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for atro_args-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ee180d0fba4883b78465c577be7bb72688216fc70a39e20fd513d3c4589522 |
|
MD5 | 388002ffc3c9df5daa47593f5ea24fb8 |
|
BLAKE2b-256 | 83f4520d0bb638cbbcc5e885aae1545afddebe289e5e3b0e830c004c4141d404 |