Metadata-Version: 2.4
Name: argparse-utils-tddschn
Version: 0.2.0
Summary: A utility library to dynamically remove and rename arguments from argparse.ArgumentParser objects.
Project-URL: Homepage, https://github.com/tddschn/argparse-utils-tddschn
Project-URL: Issues, https://github.com/tddschn/argparse-utils-tddschn/issues
Author-email: Teddy Xinyuan Chen <45612704+tddschn@users.noreply.github.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# Argparse Utils (tddschn)

Utilities for dynamically removing or renaming argparse arguments without rewriting the original CLI definition.

## Features
- Remove an option (including from mutually exclusive groups) by dest or option string.
- Replace an argument's option strings atomically with conflict detection.

## Installation
```bash
pip install argparse-utils-tddschn
```

## Usage
```python
import argparse
from argparse_utils import remove_argument, replace_argument_names

parser = argparse.ArgumentParser()
parser.add_argument("-c", "--config")
parser.add_argument("--dry-run", action="store_true")

remove_argument(parser, "--dry-run")
replace_argument_names(parser, "--config", ["-C", "--configuration"])
```

## Development
```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest
```

## License
MIT