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)
  • Color Output: Add color to help message
  • Hidden Arguments: Hidden in help message
  • 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.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 argman 0.4.2
File Size Uploaded
argman-0.4.2.tar.gz 23.1 kB Details

Built distribution (wheel)

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

Total release size: 37.3 kB

Release files / argman-0.4.2.tar.gz

Download URL argman-0.4.2.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e85e9a8849f0f4da3b9eff86328e4ea0b584da79e246dd1c596c6d1baf8b47d2
BLAKE2b-256 checksum
How to use checksums
63c43dd2ec5dde9134db273c1b67781ca613594f03f28508cb4c2e4201567f52
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.2-py3-none-any.whl

Download URL argman-0.4.2-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56f9ca6d952e99c790574b3a8446adeec2caafb3a58a854180d6bc480595ec5b
BLAKE2b-256 checksum
How to use checksums
ec8cbf58775a0de1ce1b6ac5e41c349a2ec12adda55bf9f98f2d5e586f4252cc
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

0.4.3

2 release files

This release

0.4.2 This release

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