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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for telebot_mem-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b55ccd867f3d9741ff6e6fe32235c38149a9257919923e1667d40046e2ae6f5 |
|
MD5 | 3c1ce2897c59bfa8005e8e137ec8e1f0 |
|
BLAKE2b-256 | 9b7386652cc609998410a49bd8da4e3e5c9f7a08e4ea2bb66e672ab69f57a885 |