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
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 Distribution
telebot_mem-0.1.2.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for telebot_mem-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfbabf308b817995d64f307f12298a6726460707d6edb82e087997eee1643cd4 |
|
MD5 | c77a0b8f1c030374257f22035c09cb99 |
|
BLAKE2b-256 | e1e37906cca8600af1c1b2afdf60a7c844d7884bf19ebf67d630586541c2de59 |