Skip to main content

A lightweight argument manager for Python CLI tools

Project description

ArgMan

A lightweight, zero-dependency argument parser for Python CLI tools — simple, testable, and intuitive.

ArgMan example code

Features

  • Short (-v) and long (--verbose) flags
  • Type-safe parsing: int, float, str, bool, list
  • Default values and boolean toggles
  • Repeated arguments with arg_list
  • Automatic --no-flag for booleans
  • Positional arguments
  • --arg=value and -- terminator support
  • Clean help and error messages
  • Config file support (JSON) via load_config()
  • Export parsed args via dump_args()
  • Choices validation(choices=[...])
  • Custom validation(validator=...)
  • Relation between arguments: requires, conflicts

Documentation

Usage examples and API reference: docs/


Installation

You can install ArgMan directly from PyPi:

pip install argman

Running Tests

python -m unittest discover tests

Roadmap

v0.1 — Core Functionality

  • Complete

v0.2 — Extended Features

  • arg_list, --no-flag, --arg=value, -- support
  • Custom error messages
  • config files(load_config, dump_args)
  • subcommands(one level, must be first argument can be nested now)
  • custom argv support(e.g., ArgMan(argv=['prog', '--num', '5']))

v0.3 — Docs & Publish

  • Docs ready
  • Publish to PyPI

v0.4 — Validation & Customization

  • Choices: Limit argument values to a predefined set of allowed options.
  • Validators: Define custom checks for argument values (e.g., range, format).
  • Dependencies: Specify relationships between arguments (requires, conflicts).
  • Formatters: Apply custom transformations to parsed argument values (e.g., str.lower).

License

LGPL-3.0 © 2025

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

argman-0.3.6.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

argman-0.3.6-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file argman-0.3.6.tar.gz.

File metadata

  • Download URL: argman-0.3.6.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for argman-0.3.6.tar.gz
Algorithm Hash digest
SHA256 dc6721c6050dec3868da9fd26f00c63115d0758b528d0245056c7ec6c6811a2e
MD5 36f4c982847fa2404b3ed11d04b2bad4
BLAKE2b-256 4850f8051d8e46dcc6121a472988360c763a178dceefbdbe802ba16860a3a0eb

See more details on using hashes here.

File details

Details for the file argman-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: argman-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for argman-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 adf9fb0b35051fe13c4d602455d35c1d0ab0855aef0a4b0419b7f070bac1f1a0
MD5 a45390930d51809c55a30e43a8343eb5
BLAKE2b-256 e586ed9c37876ec3424570d091d004d3fb3982896e27d2800a414b3c11ca6b06

See more details on using hashes here.

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