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.0.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

command4bot-0.4.0-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

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