Skip to main content

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).

v0.5 — Argument Organization

  • Argument Groups: Show arguments in group in help message(group_args)
  • Hidden Arguments: Hidden in help message
  • Color Output: Add color to help message(colored_help and 'colors')
  • Deprecated Arguments

v0.6 — Advanced Parsing Features

  • Count Arguments with arg_count: Track how many times flag appears(-vvv)
  • arg_dict method: Support for --env KEY=VALUE syntax
  • Range Values: Parse --pages 1-10 as range object
  • Argument Abbrevation: --verb matches --verbose

License

LGPL-3.0 © 2025

Metadata

Release files for argman 0.4.3

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

Source distribution (sdist)

Source distribution for argman 0.4.3
File Size Uploaded
argman-0.4.3.tar.gz 24.2 kB Details

Built distribution (wheel)

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

Total release size: 39.0 kB

Release files / argman-0.4.3.tar.gz

Download URL argman-0.4.3.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2e56c24e8970f8e8e7753ee58b08bf13d4dee83e9e9ec9acc8fff20996365a6d
BLAKE2b-256 checksum
How to use checksums
c663a18728bd7ba2f8fdcbb1ba19da015551fecf1d912816c8dea388d7d72008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / argman-0.4.3-py3-none-any.whl

Download URL argman-0.4.3-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d89e9a3e5c911c935901d8334abbe155ed086264a494543e70ecd3a011e31c1c
BLAKE2b-256 checksum
How to use checksums
4a2ffb8078cf8933aba8cae37251ea5f8bf082e9d7616ae792285f2ece1be785
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

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