Skip to main content

cmdtools

A flexible command framework.

tests downloads PyPI version Python version Documentation Status

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

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)

Source distribution for cmdtools-py 3.1.1
File Size Uploaded
cmdtools_py-3.1.1.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmdtools-py 3.1.1
File Interpreter ABI Platform
cmdtools_py-3.1.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

3.1.1 This release

2 release files

3.1.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

2.4.9

2 release files

2.4.8

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

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