A Handy Package to Parse Command-Line Arguments
Project description
0xFlags
A Handy Package to Parse Command-Line Arguments
Installation :
From pip :
pip3 install oxflags
From source :
git clone https://github.com/0x68616469/oxflags/
Requirements :
oxansi oxtables (downloaded automatically with pip)
Example :
from oxflags import Flag
flag = Flag(description="A Handy Package to Parse Command-Line Arguments, made by @0x68616469")
flag.new(short="-e", full="--example", type="string", default="Default string", help="Description/Usage")
flag.new(full="--age", required=True, type="int", default=None)
flag.new(short="-y", full="--yes", type="bool")
flag.parse()
print(f"Example: {flag.example}")
print(f"Age : {flag.age}")
print(f"Yes : {flag.yes}")
# $ python3 test.py --age 10 -y
# Example: Default string
# Age : 10
# Yes : True
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
oxflags-0.0.6.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file oxflags-0.0.6.tar.gz
.
File metadata
- Download URL: oxflags-0.0.6.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eec8e302cf234fd67f3d6868ea7e04e715ed8a6054bc5bbcbc531373972cc9d |
|
MD5 | 2c932631626464024ab7060031b34bc1 |
|
BLAKE2b-256 | 63086f8a888014bf77c0603263187dbcc4f1354c065cae2e99e13970408f2e5b |
File details
Details for the file oxflags-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: oxflags-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d37b7e6052838fc9d3ab18c82f04a1928e80900fff1c3701b988797ccf6f91df |
|
MD5 | f1c64213e3c7e8c712ca21f7fa2063b1 |
|
BLAKE2b-256 | 64de177255f4ebd162e6fbdad13808a3fe1814f86a75b09fb96b073061d662a2 |