Skip to main content

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: argparse has 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 argparse for 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

argflow-2.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

argflow-2.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for argflow-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3e8ccb511e512a2ae154a7e77b8edf612291390a25f0fdaba26603d92d736c43
MD5 69bb1907ca6231fbe7bfabe365178cf8
BLAKE2b-256 485b06dcd094b6d6db1fd983736263b9ec3c4200e5b54dc9365445f1c6d45cbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for argflow-2.0.0.tar.gz:

Publisher: python-publish.yml on alesisce/argflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for argflow-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e134f2f10f5ed9ba95d66af25149c683808227d6858696fc7a754700145a723
MD5 f7397eda465b8d3667e673471b494300
BLAKE2b-256 64af97616306e88ce298915136a775c3c6290d82c8071486fdd4d25ddc712246

See more details on using hashes here.

Provenance

The following attestation bundles were made for argflow-2.0.0-py3-none-any.whl:

Publisher: python-publish.yml on alesisce/argflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page