Skip to main content

targ

Build a Python CLI for your app, just using type hints and docstrings.

Just register your type annotated functions, and that's it - there's no special syntax to learn, and it's super easy.

# main.py
from targ import CLI


def add(a: int, b: int):
    """
    Add the two numbers.

    :param a:
        The first number.
    :param b:
        The second number.
    """
    print(a + b)


if __name__ == "__main__":
    cli = CLI()
    cli.register(add)
    cli.run()

And from the command line:

>>> python main.py add 1 1
2

To get documentation:

>>> python main.py add --help

add
===
Add the two numbers.

Usage
-----
add a b

Args
----
a
The first number.

b
The second number.

Documentation

The full documentation is available on Read the Docs.

Metadata

Release files for targ 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for targ 0.1.4
File Size Uploaded Provenance Actions
targ-0.1.4.tar.gz 4.9 kB Without provenance Details for targ-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 10.5 kB

Release files / targ-0.1.4.tar.gz

Download URL targ-0.1.4.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5e16d6a281dbedfb594e9b632db41ed918b6668e006e5abc9856a18f6aa8697d
BLAKE2b-256 checksum
How to use checksums
a25f0fe3dcc232ded5a32433471f3c47b65149dae0631ae302794b5aebf802d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

Release files / targ-0.1.4-py3-none-any.whl

Download URL targ-0.1.4-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
686984bfd844aa85276cbaeffbf824513f294bcda565e97c5e96fd0f3c64b6fe
BLAKE2b-256 checksum
How to use checksums
c3cf6f20bdc95841d6f5c6c9d3bcdb872242745962326e31374fea0ee3557848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

Security for targ 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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