Fuzzy Commands for Click
Fuzzy command matching and aliases for click
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)
| File | Size | Uploaded | |
|---|---|---|---|
| click_fuzzy-0.2.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| click_fuzzy-0.2-py3-none-any.whl | Python 3 | none | any | Details |
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
|