Installation
pip install --upgrade cmdtools-py
install the latest commit from GitHub
pip install git+https://github.com/HugeBrain16/cmdtools.git
Basic example
import asyncio
import cmdtools
@cmdtools.callback.add_option("message")
def send(ctx):
print(ctx.options.message)
@send.error
def error_send(ctx):
if isinstance(ctx.error, cmdtools.NotEnoughArgumentError):
if ctx.error.option == "message":
print("Message is required!")
cmd = cmdtools.Cmd('/send hello')
asyncio.run(cmdtools.execute(cmd, send))
see more examples
Links
PyPI project: https://pypi.org/project/cmdtools-py
Repository: https://github.com/HugeBrain16/cmdtools
Issues tracker: https://github.com/HugeBrain16/cmdtools/issues
Documentation: https://cmdtools-py.readthedocs.io/en/latest
Metadata
Release files for cmdtools-py 3.1.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 | Actions |
|---|---|---|---|---|
| cmdtools_py-3.1.1.tar.gz | 10.9 kB | Without provenance | Details for cmdtools_py-3.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cmdtools_py-3.1.1-py3-none-any.whl | Python 3 | none | any | Details for cmdtools_py-3.1.1-py3-none-any.whl |
Total release size: 26.2 kB
Release files / cmdtools_py-3.1.1.tar.gz
| Download URL | cmdtools_py-3.1.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d563c9b7f20b120d077fe41e85c16a83a5a1a1ba440528433f72920e4191e468
|
|
BLAKE2b-256 checksum How to use checksums |
2c9d1a84a38f2795c5b73addf38e63444d3adbd85173269913bb8cf3bea7aecb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.14.7 Linux/7.2.7-zen1-1-zen
|
Release files / cmdtools_py-3.1.1-py3-none-any.whl
| Download URL | cmdtools_py-3.1.1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32ce552d5396af91a4cb330c1c0ef9843fabc2447089f1f04aabb7c3c0bd38f2
|
|
BLAKE2b-256 checksum How to use checksums |
5eb7290a0a7188faca2eb32684c051ed42e3f5428179d43106002c5058667478
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.14.7 Linux/7.2.7-zen1-1-zen
|
Security for cmdtools-py 3.1.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.