Skip to main content

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

Documents Chatbot from Lotus: https://lotuschat.vn/user/chatbots/docs

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.16:
    • change _handle_message_hook to async
  • 0.1.15:
    • add document
    • change structure for
    • fix import error in command.
    • add edit message and edit message api
  • 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


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.16.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lotuschat_bot_sdk-0.1.16-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file lotuschat_bot_sdk-0.1.16.tar.gz.

File metadata

  • Download URL: lotuschat_bot_sdk-0.1.16.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for lotuschat_bot_sdk-0.1.16.tar.gz
Algorithm Hash digest
SHA256 a2cbba60d1cf867b83893280fa8eff4e5dc8ba5aa21d1537d75d272eb9de268c
MD5 52a1704fd4da144b50f21f0517cc8592
BLAKE2b-256 ee4836a82752d0c89de3242a887daf5d6aa733b8ebb700c1fcd2064dff828b9e

See more details on using hashes here.

File details

Details for the file lotuschat_bot_sdk-0.1.16-py3-none-any.whl.

File metadata

File hashes

Hashes for lotuschat_bot_sdk-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 6c05fdc40beabb910c7fa7390d5c41811530b6ef94e8ef6921a9abcaa93c1a58
MD5 c2a8aaf60334130b0825ffba55f27fd9
BLAKE2b-256 0ffde40617c464b4171d7d9758ede73f4387f3939064a98bae4c9ad242a5c9da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page