Skip to main content

Telebot with memory extension. It supports add a database backend to save chat histories.

Project description

Telebot Memory (telebot_mem)

Telebot with memory extension. It supports add a database backend to save chat histories.

Quick start

Install from Pypi or from source

PyPi

python3 -m pip install telebot-mem

Start a docker instance of mongo for quick experimentation

mkdir -p local/db
docker run -v ./local/db/:/data/db --rm -d -p 27017:27017 --name=mongo-test mongo:latest
memdb = MongoMem("mongodb://localhost:27017/", "telegram")

@bot.message_handler(func=lambda message: True)
@memdb.memorize
def echo_message(message):
    ...

Refer to echo bot example with mongodb

Roadmap

Beta (v0.x) API will subject to change

  • Test interface for mongodb support

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

telebot_mem-0.1.2.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

telebot_mem-0.1.2-py3-none-any.whl (3.0 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