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.

Source Distribution

botpie-0.0.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

botpie-0.0.1-py3-none-any.whl (7.1 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