click-shell is an extension to click that easily turns your click app into a shell utility. It is built on top of the built in python cmd module, with modifications to make it work with click.
Features
Adds a “shell” mode with command completion to any click app
Just a one line change for most click apps
Usage
Simply replace @click.group with @click_shell.shell on the root level command:
from click_shell import shell
# @click.group() # no longer
@shell(prompt='my-app > ', intro='Starting my app...')
def my_app():
pass
@my_app.command()
def testcommand():
print('testcommand is running')
# more commands
if __name__ == '__main__':
my_app()
When run, you should expect an output like so:
$ python my_app.py
Starting my app...
my-app > testcommand
testcommand is running
my-app >
For more advanced usage, check out our docs at https://click-shell.readthedocs.io/
Metadata
Release files for click-shell 2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| click-shell-2.1.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| click_shell-2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 17.0 kB
Release files / click-shell-2.1.tar.gz
| Download URL | click-shell-2.1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce0c91faae284c41a39bec966f928791ad4a45763755445f1fe2041fd091aa37
|
|
BLAKE2b-256 checksum How to use checksums |
9e2693dd93fb1714f64376989b9e809982fd64d5f26e666b6d55458066c40b53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.1
|
Release files / click_shell-2.1-py2.py3-none-any.whl
| Download URL | click_shell-2.1-py2.py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2d971a2e50eb7ad387cf0ce79ba4b844e66e0580784e2efe2df58b50a2f047f0
|
|
BLAKE2b-256 checksum How to use checksums |
21ced81dcb726c436bf3f77d0145e03bf364c189cc95e6551e797bc0511dcea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.1
|
Security for click-shell 2.1
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.