Metadata-Version: 2.5
Name: tsarp
Version: 0.0.2
Summary: Type-Safe Argument Parser
Author-email: Ian Pilcher <arequipeno@gmail.com>
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-Expression: LGPL-3.0-or-later
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
License-File: lgpl-3.0.txt
Project-URL: Bug Tracker, https://github.com/ipilcher/tsarp/issues
Project-URL: Documentation, https://ipilcher.github.io/tsarp/
Project-URL: Homepage, https://github.com/ipilcher/tsarp
Import-Name: tsarp

<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# TSArP - Type-Safe Argument Parser

Copyright 2026 Ian Pilcher <<arequipeno@gmail.com>>

## Overview

**TSArP** (pronounced like "zarp") is a wrapper around Python's `argparse`
module that supports static type-safety.


## Limitations

**TSArP** is very much alpha software.

* It currently supports only a fraction of the full functionality of
  `argparse`.

* Python 3.14 or later is required.

* Inheritance of schema attributes (types, groups, arguments, etc.) is not
  possible.

* The API is very much in flux.

* Lots of edge cases remain to be worked out.

Despite this, it is still useful.

## Use

The basic usage pattern is:

 1. Create any custom types (instances of `tsarp.Type`).

 2. Create a schema (a subclass of `tsarp.Schema`) for any subcommands and the
    top-level command-line interface.

 3. Call `tsarp.parse()`, passing the top-level schema class as the first
    argument.

 4. `tsarp.parse()` returns an instance of the top-level schema class
    (containing instances of any subcommand schemas that were invoked).

### See also

  * [API documentation](https://ipilcher.github.io/tsarp/)
  * [`example.py`](example.py)


