Skip to main content

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


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.15.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

atro_args-0.7.15-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file atro_args-0.7.15.tar.gz.

File metadata

  • Download URL: atro_args-0.7.15.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.5.0-1015-azure

File hashes

Hashes for atro_args-0.7.15.tar.gz
Algorithm Hash digest
SHA256 9dc984c97ca3b55e264d29d3753bbc4cd6fbd2d0184971a015c160302f617c23
MD5 843b23935d72b4e9ccf65e0ee1f79776
BLAKE2b-256 19ca4ad0fd61a59a811cf2953c5c563dab4f0bb8d85b991ea794fe3da4582565

See more details on using hashes here.

File details

Details for the file atro_args-0.7.15-py3-none-any.whl.

File metadata

  • Download URL: atro_args-0.7.15-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.5.0-1015-azure

File hashes

Hashes for atro_args-0.7.15-py3-none-any.whl
Algorithm Hash digest
SHA256 66247aaecfcbd60ab056d3117d4a01edbde498f3b2f760cdaad60b5f063c760c
MD5 55c0e5a64590eb70a14f19a4dda2e373
BLAKE2b-256 528e909f1a195640fd314cc813e382b5d1a10e2b40cdde1125f715b5703c74cc

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