Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsarp-0.0.2.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsarp-0.0.2-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file tsarp-0.0.2.tar.gz.

File metadata

  • Download URL: tsarp-0.0.2.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tsarp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8ee65b446e6ef32447c7f8297d7859f2dee31f8871f9ff3432046c2629507741
MD5 1d4bae529b7798bc41c7b5bbd5dda667
BLAKE2b-256 9479940329daeaffbe13a389cd87fdb88664078b13082ab9e45112cad2519cd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsarp-0.0.2.tar.gz:

Publisher: python-publish.yml on ipilcher/tsarp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsarp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: tsarp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tsarp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd65427809e73dc9057fa612c2f14cb755ff8a7e3289c6820d6a7a75d85968d8
MD5 8ca037c9248c63e7cad6f98a46c01a38
BLAKE2b-256 8ca03975f64997b59f6d6d583d115ebe7b347b3591c2ed79111dd7cb36ea4627

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsarp-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on ipilcher/tsarp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 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