Skip to main content

ArgHandle v2.2.2

A simple, lightweight alternative to argparse. No confusion, no boilerplate, just clean argument handling for your CLI tools.

Built because argparse is overkill for most scripts. ArgHandle gives you exactly what you need: register args, match them, print help/version, done.

Installation

pip install arghandle==2.2.2

Quick Start

from arghandle import ArgHandle

cli = ArgHandle("YourProgramName", "v0.0.0") # Replace v0.0.0 with program version
# cli.ProgramName("mytool") <- This replaces the program name to mytool
# cli.Version("v1.0.0") <- This replaces the version number to v1.0.0
# cli.CustomVersionMsg("mytool, custom message") <- Overrides the --version/-v output entirely

cli.RegisterArg(["--output", "-o"], StrictIndex=1, StrictIndex_ExitOnError=True, HelpMsg="Output file")
cli.RegisterArg(["--input", "-i"], VarIndex=2, HelpMsg="Input file")

cli.PrintOnNoArgs("No arguments provided. Use --help or -h for usage.")
cli.HandleBasic()

if cli.input:
    print(f"Input: {cli.input}")

Running mytool --help prints:

mytool v0.0.0 --help called:
  [--help, -h]: Print this help message and exit.
  [--output, -o]: Output file
  [--input, -i]: Input file

Running mytool --version prints:

mytool v0.0.0

Documentation

ArgHandle documentation is availiable at Documentation.

Real World Example

ArgHandle was built as part of AutoBuild, a Make-like build system with its own .abuild syntax. Check it out to see ArgHandle in action in a real project.

License

GPLv3, see LICENSE for details.

Metadata

Release files for arghandle 2.2.2

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

Source distribution (sdist)

Source distribution for arghandle 2.2.2
File Size Uploaded Provenance
arghandle-2.2.2.tar.gz 44.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 80.2 kB

Release files / arghandle-2.2.2.tar.gz

Download URL arghandle-2.2.2.tar.gz
Size 44.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a78bc680724e0382e8655b28e0d32f2e8412c5b007e7664f1efe2e3aa72c4b2f
BLAKE2b-256 checksum
How to use checksums
5d7829af41a40f7cb37e92a77d12ca1c3e87b73fd8c84e6067f9770a96597e5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / arghandle-2.2.2-py3-none-any.whl

Download URL arghandle-2.2.2-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddf4c7c92a947ff76772f4df094e2487abc3bb056e0aa9c378154ba91103e413
BLAKE2b-256 checksum
How to use checksums
447f961e6baa0f518744be905c121d128544763679ae1781dba51bcf38f6d419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for arghandle 2.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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