SDK for interacting with LotusChat API
Project description
Lotus-chat Bot Sdk
A lightweight and extensible Python SDK to interact with the LotusChat Bot API
🚀 Summary
LotusChat Bot SDK simplifies integration with the LotusChat platform. It supports:
- Sending messages, documents, and commands
- Receiving and handling incoming messages via webhook or polling
- Custom keyboard and entity formatting
- Async and sync interfaces
💻 Version
lastest verison: 0.1.15
Install dependencies:
pip install lotuschat-bot-sdk
⚙️ Python Compatibility
- Supported versions:
>=3.13
📦 Dependencies
| Library | Purpose |
|---|---|
aiohttp |
Async HTTP requests |
pydantic |
Data validation / modeling |
schedule |
Scheduled jobs |
flask |
Webhook support (optional) |
requests |
Synchronous fallback |
pillow |
Image conversion (.webp, etc) |
beautifulsoup4 |
HTML parsing for sticker sets |
playwright |
Optional: scrape dynamic content (requires install) |
Change log versions:
- 0.1.14:
- fix send message có truyền entity
- and 3 api set,get,delete command
- fix return raw messge nếu response nó trả về không phải json
- 0.1.13:
- add async cho function
- add delete message function
- change package sdk -> lotuschat_sdk
- 0.1.12:
- update 2 api sendMessage & getUpdates full parameters
- open entity_extract used for extract entities in messages object
How to use
init
bot = ChatBot(
name="bot name used for filter message from this bot",
token="bot token, get from @BotCreator",
max_threads=5, # Optional : thread number used for bot, default = 5
is_vpn=True # Optional : True for develop, False for lotuschat.vn
)
hook message
app = Flask(__name__)
@app.route("/", methods=["POST"])
def lc_webhook():
return bot.web_hook()
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
lotuschat_bot_sdk-0.1.15.tar.gz
(10.5 kB
view details)
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 lotuschat_bot_sdk-0.1.15.tar.gz.
File metadata
- Download URL: lotuschat_bot_sdk-0.1.15.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fedbd4b5702d05bbfe427a3dad8ae7db0b66c8da5510c1d7f4390f0b7b462686
|
|
| MD5 |
a938a41bc36102ffb93e6ba745f3a9fd
|
|
| BLAKE2b-256 |
dad808dadf2f1b426db00dd56e41b807aa247a5a94f44f97c0422dacf83dfd19
|
File details
Details for the file lotuschat_bot_sdk-0.1.15-py3-none-any.whl.
File metadata
- Download URL: lotuschat_bot_sdk-0.1.15-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80e24205101987381a77b5abe89ac992882aad55fd1568d7bec76ac1e2e1fa8b
|
|
| MD5 |
25dd60a1eabdeae485b546f6d62ed9ba
|
|
| BLAKE2b-256 |
4126cfd242a960ca168afbe6405e36e14604ebc40fbf108c684ad98e389d839f
|