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
Basic Example
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.get_dict()
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.7.5.tar.gz
(9.2 kB
view hashes)
Built Distribution
atro_args-0.7.5-py3-none-any.whl
(12.0 kB
view hashes)
Close
Hashes for atro_args-0.7.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad74fbc881a5c6480cbb38864320ef4764c5b7626b95146aeb76f8bc0d3a1939 |
|
MD5 | 3f2593aa61b76f97c9ddd2080801fbdc |
|
BLAKE2b-256 | d0767c18c5f80542ef4d5eb48d6c154c726d747f0315f7aec501c4e57081fb47 |