Skip to main content

Argeye - a small improved version of Argparse

argeye retains all the original usage of argparse,but adding a yml file so user can modify arguments by editing yml file.

argparse supports command lines to set arguments,whose disadvantages is that the user have to type the arg strings and values.

the typing is a redundant operation,which may cause mistakes and counterintuitive understanding of the args.

yml file provides intuitive understanding and a more convenient way to set args.

only one line change,better experience of argparse

usage

(original)

retained all the original usage of argparse,detailed info refer to official document

(new)

first run (same as running argparse)

# examples/main.py
from argeye import ArgumentParser

parser = ArgumentParser()
parser.add_argument("equip_name", type=str, default="wired")
parser.add_argument("--model_name", default="pd", type=str)
parser.add_argument("--finetune", default=False, type=bool)

args = parser.parse_args()
print(args)
# decide whether to input arguments at the terminal based on actual needs
$ python examples/main.py
Namespace(equip_name='wired',model_name='pd',finetune=True)

after executing the above command line operations,the yml file will be created in the work directory.

the content of the yml file is as follows:

equip_name: wired
--model_name: pd
--finetune: false

now having the yml file,the user can change arguments values by editing yml file instead of typing strings into command lines.

when the change operation is completed(completed in the yml file),simply run the python file without the need of typing arguments on the command line.

example:

# change arguments in the yml file
equip_name: wireless
--model_name: resnet
--finetune: True
# run python file directly
$ python examples/main.py
Namespace(equip_name='wireless', model_name='resnet', finetune=True)

installation

pip install argeye

Metadata

Release files for argeye 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argeye 0.0.3
File Size Uploaded
argeye-0.0.3.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argeye 0.0.3
File Interpreter ABI Platform
argeye-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 51.9 kB

Release files / argeye-0.0.3.tar.gz

Download URL argeye-0.0.3.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3a6ca49479e420f4fabb06f92781af1494b3c25e709bd9e0658a80527ed5c995
BLAKE2b-256 checksum
How to use checksums
12dfb3d27e19098cc64103d9937f30a84f1ead840df9ebb8a11939f846e69979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18

Release files / argeye-0.0.3-py3-none-any.whl

Download URL argeye-0.0.3-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49e4e5cbea7b695a00572318d6a10dac3c4af9e3074bb637ab4273b2cad98a07
BLAKE2b-256 checksum
How to use checksums
07927d5be4df53428cc582d3f00de58f7928ee736c981abf91b307730178829e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page