Skip to main content

A Python framework for managing chatbots

Project description

BotPie

A Python framework for managing chatbots - 0.0.1 (alpha)

Install and Run

git clone https://github.com/gwilkes/botpie.git
cd botpie/
python setup.py install

Features

Argument Parsing

BotPie handles command parsing by using the Python argparse module to do most of the work.

Basic Script

import botpie
import random

message = botpie.utils.argvstr()
bot = botpie.Bot("ImportantBot")

@bot.command("tracer")
def tracer():
    greets = ["hiya!", "heya!", "hi!", "hoiya!"]
    return random.choice(greets)

result = bot.inspectstr(message)

if result:
    print(result)

The above example was tested by running python examples/basic.py tracer

Work In Progress

This is a lightweight initial release which does not include several of the desired features yet. Here are some of the plans for future releases:

  • Asynchronous support
  • Optional storage solution for Bot data

Other todos:

  • Fix docstrings
  • Include a better example for above (show off decorators, use discord connection, etc)

Requirements

Python 3.7+ (this may change down the road to support older versions)

Project details


Download files

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

Files for botpie, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size botpie-0.0.1-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size botpie-0.0.1.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page