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.
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-flagfor booleans - Positional arguments
--arg=valueand--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 argumentcan be nested now) - custom
argvsupport(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 — More...
- Argument Groups: Show arguments in group in help message
License
LGPL-3.0 © 2025
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argman-0.4.0.tar.gz.
File metadata
- Download URL: argman-0.4.0.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91af8de5b9a5b85781170117629ceacd8ce42e048d6cb97f130740756b7c1fde
|
|
| MD5 |
c4eba821d676ab302d0bf1f33edbce2b
|
|
| BLAKE2b-256 |
37d2be5513d759511350a040759172077c44120f022d14d10a7dd8b809192fce
|
File details
Details for the file argman-0.4.0-py3-none-any.whl.
File metadata
- Download URL: argman-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80a836a55721040c892c239667bb0c77d37e8ef3783196732c122335ef91a94c
|
|
| MD5 |
84b0f59aef8f44a8f3b6c59eb1dfaa54
|
|
| BLAKE2b-256 |
3d655b903d82c459a8d413a7d37e6039cf9c94377470bdc647492292421c6ad7
|