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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telebot_mem-0.1.2.tar.gz.
File metadata
- Download URL: telebot_mem-0.1.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3a52eb303c16fd9c326f23d2504fc3db6c5f98c62581ac8b9b17bd1ea787342
|
|
| MD5 |
960a5f87e38230a979eed2e7e35c789b
|
|
| BLAKE2b-256 |
b0d00dea468fff5b4917f394bce5f1db473ef9b4154060a402fc9139b6020a9f
|
File details
Details for the file telebot_mem-0.1.2-py3-none-any.whl.
File metadata
- Download URL: telebot_mem-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfbabf308b817995d64f307f12298a6726460707d6edb82e087997eee1643cd4
|
|
| MD5 |
c77a0b8f1c030374257f22035c09cb99
|
|
| BLAKE2b-256 |
e1e37906cca8600af1c1b2afdf60a7c844d7884bf19ebf67d630586541c2de59
|