Skip to main content

Fuzzy Commands for Click

Fuzzy command matching and aliases for click

version license

Allows use of automatic prefix aliases and matching small typos:

$ command h
WARNING: Assuming 'h' is short for 'hello'
Hello world!

$ command helol
WARNING: Assuming 'helol' is slang for 'hello'
Hello world!

Explicit aliases can also be defined:

$ command --help
Usage: command [OPTIONS] COMMAND [ARGS]...

Commands:
  hello, hi  The traditional greeting

$ command hi --help
Usage: command hello [OPTIONS]

Install

$ pip install click-fuzzy

Usage

from click_fuzzy import FuzzyCommandGroup

@click.group(cls=FuzzyCommandGroup)
def main(...):
    ...

@main.command("hello")
@main.alias("hi")
def hello():
    ...

That's it. Everything else happens automatically.

If you only want explicit aliases, and don't want automatic prefix or fuzzy matching, use AliasedCommandGroup instead of FuzzyCommandGroup:

License

Fuzzy Commands is copyright Amethyst Reese, and licensed under the MIT license.

Metadata

Release files for click-fuzzy 0.2

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

Source distribution (sdist)

Source distribution for click-fuzzy 0.2
File Size Uploaded Provenance Actions
click_fuzzy-0.2.tar.gz 9.1 kB Without provenance Details for click_fuzzy-0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for click-fuzzy 0.2
File Interpreter ABI Platform Actions
click_fuzzy-0.2-py3-none-any.whl Python 3 none any Details for click_fuzzy-0.2-py3-none-any.whl

Total release size: 15.3 kB

Release files / click_fuzzy-0.2.tar.gz

Download URL click_fuzzy-0.2.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a2ace5da2941650c12cf9de6008e11d1d6a07f4baca4280d5cdee92c9bec9332
BLAKE2b-256 checksum
How to use checksums
4471e6b534eaadd5d9fa150898534fb2ec198537be950f3510bc97cc91486730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / click_fuzzy-0.2-py3-none-any.whl

Download URL click_fuzzy-0.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4a6deaeee4ef4abd98276a0d7a36dbf7bf0729bc747cc22ace1335400a1a9bb
BLAKE2b-256 checksum
How to use checksums
9c7c60dcbb3b015c450b0acba3a08fe5417e7451229a7d5f2a2c632ad7038a93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Security for click-fuzzy 0.2

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.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

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