Skip to main content

Python-based open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.

This repository is inspired by the javascript library Botkit and the BotFramework SDK concepts.

Adapters

You can connect major plataforms using the same bot core code by setting different adapters. Adapter is a interface between your bot and message plataforms.

Adapter Docs Availability
Web 0.0.1
Slack
Telegram
Facebook
Twilio (SMS)
Whatsapp

Usage

Installation

pip install botgen

Copy and paste the code below to a file called run.py

# run.py
from botgen import Bot
from botgen import BotMessage
from botgen import BotWorker
from botgen.adapters import WebAdapter

adapter = WebAdapter()
bot = Bot(adapter=adapter)

async def hello(bot_worker: BotWorker, message: BotMessage):
    await bot_worker.say("hello from bot")


bot.hears(pattern="hello", event="message", handler=hello)

bot.start()

So you can run the project using:

python run.py

Then start a conversation:

curl -L -X POST 'http://localhost:8080/api/messages' -H 'Content-Type: application/json' -d '{
	"user": "dummy",
    "text": "hello",
    "type": "message"
}'

How to contribute

Metadata

Release files for botgen 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for botgen 0.0.2
File Size Uploaded Provenance Actions
botgen-0.0.2.tar.gz 5.5 kB Without provenance Details for botgen-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for botgen 0.0.2
File Interpreter ABI Platform Actions
botgen-0.0.2-py3-none-any.whl Python 3 none any Details for botgen-0.0.2-py3-none-any.whl

Total release size: 12.9 kB

Release files / botgen-0.0.2.tar.gz

Download URL botgen-0.0.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1c76ddb67d072462193da965c4aa322ab48535db3745754a1819a6a92822d8fb
BLAKE2b-256 checksum
How to use checksums
9debf719f14a609c0f086b83411fb242261add8c68dd016fd7110cced1aa5455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1015-azure

Release files / botgen-0.0.2-py3-none-any.whl

Download URL botgen-0.0.2-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba98fa6f23d53abe777367d52d352dae53df0a8071db67fea6be48e5969b262e
BLAKE2b-256 checksum
How to use checksums
33d74b5f6f2b54cc4bc35149f4567fd7a586eb5fce9349df44ef5401a2c3c658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1015-azure

Security for botgen 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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