The easier and "faster" alternative to argparse.
Project description
Argflow
Argflow is a fast, lightweight, and modular argument parser for Python.
It is designed as a simpler alternative to argparse, ideal for small to medium CLI scripts.
Features
- Minimal and easy-to-use API.
- Modular callbacks for each argument-
- Extremely fast parsing (~70 lines of code).
- Built-in helper.
- Super flexible.
Argflow vs Argparse
Note:
argparsehas more features, so its execution time is naturally higher.
Benchmark for a single argument:
| Parser | Parse Time |
|---|---|
| argparse | 0.009876 s |
| argflow | 0.000215 s |
- Argflow is ~98% faster than
argparsefor parsing. - Demonstrates how a compact library can create powerful and fast CLIs.
Reliability
- Argflow is relatively new and still in active development.
- Suitable for personal projects and experiments, but use with caution in critical production environments.
Example Usage
from argflow import argflow
ag = argflow()
@ag.new_argument(flag="--hello", helper="Just, welcoming...", example="--hello=Jack") # Adding new argument
def hello(name):
print("Hello, " name + "!")
ag.parse() # Parsing
Command line:
python script.py --hello=Alice
# Output: Hello, Alice!
License
MIT License – free to use, modify, and distribute.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argflow-2.0.0.tar.gz.
File metadata
- Download URL: argflow-2.0.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8ccb511e512a2ae154a7e77b8edf612291390a25f0fdaba26603d92d736c43
|
|
| MD5 |
69bb1907ca6231fbe7bfabe365178cf8
|
|
| BLAKE2b-256 |
485b06dcd094b6d6db1fd983736263b9ec3c4200e5b54dc9365445f1c6d45cbe
|
Provenance
The following attestation bundles were made for argflow-2.0.0.tar.gz:
Publisher:
python-publish.yml on alesisce/argflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
argflow-2.0.0.tar.gz -
Subject digest:
3e8ccb511e512a2ae154a7e77b8edf612291390a25f0fdaba26603d92d736c43 - Sigstore transparency entry: 738647440
- Sigstore integration time:
-
Permalink:
alesisce/argflow@cd606a8c3cf52d5a52a80916c06ddbe44b2e11c7 -
Branch / Tag:
refs/tags/2.0.0 - Owner: https://github.com/alesisce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cd606a8c3cf52d5a52a80916c06ddbe44b2e11c7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file argflow-2.0.0-py3-none-any.whl.
File metadata
- Download URL: argflow-2.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e134f2f10f5ed9ba95d66af25149c683808227d6858696fc7a754700145a723
|
|
| MD5 |
f7397eda465b8d3667e673471b494300
|
|
| BLAKE2b-256 |
64af97616306e88ce298915136a775c3c6290d82c8071486fdd4d25ddc712246
|
Provenance
The following attestation bundles were made for argflow-2.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on alesisce/argflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
argflow-2.0.0-py3-none-any.whl -
Subject digest:
5e134f2f10f5ed9ba95d66af25149c683808227d6858696fc7a754700145a723 - Sigstore transparency entry: 738647455
- Sigstore integration time:
-
Permalink:
alesisce/argflow@cd606a8c3cf52d5a52a80916c06ddbe44b2e11c7 -
Branch / Tag:
refs/tags/2.0.0 - Owner: https://github.com/alesisce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cd606a8c3cf52d5a52a80916c06ddbe44b2e11c7 -
Trigger Event:
release
-
Statement type: