A very easy to use argument parser.
Project description
fargv: The laziest command-line argument parser
Installation
pip3 pip install --user --upgrade git+https://github.com/anguelos/fargv
Usage in 3 Simple Steps!
Fast argument parser
- Immport
from fargv import fargv
- Define a dictionary with default parameters
params = {
"anInt": 1,
"aFloat": 0.1,
"aBoolean": False,
"anotherBoolean": True,
"aString": "Hello",
"aStringReference": "{aString} World",
"anIntWithHelp": [2,"This would be the help"],
"aChoice": [("choice1","choice2","choice3","choice4"),"And this must be the help"]
}
- Parse user provided argv to override defaults
new_params, help_str = fargv(params)
- In shell:
my_program -anInt 34 -aFloat=2.3 -aBoolean -anotherBoolean=False
Features:
- Type checking
- Automatic help generation
- Params usable as dictionary or struct
- Can read environmental variables as well
- macro-parameters
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
fargv-0.1.0-py3-none-any.whl
(4.7 kB
view details)
File details
Details for the file fargv-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: fargv-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff1692f8fdcf38e9c00e840c68451f9efc3d4a330c7548d01acf099115365a46 |
|
MD5 | ae163d307e63ec7bb44ed27a86560876 |
|
BLAKE2b-256 | 94537f6f07e533d77e38e666f24a81c7e7d8e229bc4af4a477b160fe79b1a7c8 |