Skip to main content

A general purpose library for command-based iteraction made for bots

Project description

Command For Bot

PyPI PyPI - Wheel PyPI - Python Version

Run Tests codecov

Libraries.io dependency status for GitHub repo GitHub last commit PyPI - Downloads

Check Code Style pre-commit Code style: black Imports: isort

command4bot is a general purpose library for command-based iteraction made for bots.

Installation

pip install command4bot

Quick Start

from command4bot import CommandsManager

mgr = CommandsManager()

@mgr.command
def greet(payload):
    return f"Hello, {payload}!"

mgr.exec('greet John')  # 'Hello, John!'

Features

  • Register command with a simple decorator
  • Managing command open and closed status with ease
  • Automatically manage command's dependency (a.k.a. context) with its status
  • Fallback handlers if no command found

Documentation

:warning: The documentation is still working in progress!

https://command4bot.readthedocs.io/en/latest/

Todo

  • Support for commands need interaction

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

command4bot-0.4.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

command4bot-0.4.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file command4bot-0.4.1.tar.gz.

File metadata

  • Download URL: command4bot-0.4.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Windows/10

File hashes

Hashes for command4bot-0.4.1.tar.gz
Algorithm Hash digest
SHA256 7467d8fcf8cc292638403cbc5b79f8cb910db63db75271d3894fb1c650450fe3
MD5 d227091a09bc70b6c331292e4d0bf93a
BLAKE2b-256 eb8fc34d5423f3bf80c25cfe64b9b37945ba31f833785081ad1d3b00811a1149

See more details on using hashes here.

File details

Details for the file command4bot-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: command4bot-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Windows/10

File hashes

Hashes for command4bot-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88a8f87cd415f0b2193b3ae6f3e147263885789179a9bc7f9f8a17022d63a589
MD5 7ccb1ae447d51ae3708d869f9b000e4b
BLAKE2b-256 7a59530afe682b0b4238874fe82c612996916ae0efda5ff5e79d49f8ab1aee26

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page