Skip to main content

aclick

pypi tests coverage python

aclick is a python library extending click with the support for typing. It uses function signatures to automatically register options to parsers. Please refer to the documentation.

The following features are currently supported:

  • Positional-only parameters are added as click Arguments, other parameters become click Options.
  • Docstring is automatically parsed and used to generate command and parameter descriptions.
  • Arguments with int, float, str, bool values both with and without default value.
  • Complex structures of classes and dataclasses that are automatically inlined as a single string, e.g., class1("arg1", arg2=class2()).
  • Complex structures of classes and dataclasses that are expanded as individual options with the hierarchical=True option enabled.
  • Type Union of complex classes both inlined and hierarchical.
  • Type Optional of inlined complex classes.
  • Type Literal of strings.
  • Lists and tuples of both the primitive and inlined complex types.
  • Parameters can be renamed.
  • Parameter values can be loaded from a JSON, YAML, or other file.
  • Configuration can be loaded using the gin-config package.
  • For other features please refer to the documentation.

Installation

Install the library from pip:

$ pip install aclick

Getting started

Import aclick instead of click:

# python main.py test --arg2 4

import aclick

@aclick.command()
def example(arg1: str, /, arg2: int = 5):
    pass

example()

When using click.groups:

# python main.py example test --arg2 4

import aclick

@aclick.group()
def main():
    pass

@main.command('example')
def example(arg1: str, /, arg2: int = 5):
    pass

main()

For further details please look at the documentation.

License

MIT

Metadata

Release files for aclick 0.2.3

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

Source distribution (sdist)

Source distribution for aclick 0.2.3
File Size Uploaded Provenance
aclick-0.2.3.tar.gz 28.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 59.4 kB

Release files / aclick-0.2.3.tar.gz

Download URL aclick-0.2.3.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
df0f22f379913d8e4c3dfdfce8551dda2ba1861c14c35a2445671a2e1a5582b1
BLAKE2b-256 checksum
How to use checksums
481b7db7d83b8c35744ed080e361be2ad19ec008b19ab7688d23ede305de64b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / aclick-0.2.3-py3-none-any.whl

Download URL aclick-0.2.3-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
474462ebb40cfa7fa31e0cf6185cf173f69cb248e9bafbc2fed96d91160b4914
BLAKE2b-256 checksum
How to use checksums
3e7b94aaf1f17e8b2f94e03b618c70472e705745da56db7d922aed1b0ea44eec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for aclick 0.2.3

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.

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