Skip to main content

Python SDK for the Zalo Bot API

Project description

Tiếng Việt

ZaloBot Python SDK (Work in Progress)

A modern, fully-typed, and asynchronous Python SDK for the ZaloBot API. This library was built as a more ergonomic and developer-friendly alternative to the official SDK.

Features

Feature Description
Fully Typed & Documented Complete type hints and docstrings. No need to dig through source code to figure out expected data types.
Pydantic Data Modeling All API responses are validated and converted into Pydantic models. This improves Developer Experience (DX) and significantly reduces errors related to raw JSON parsing.
True Asynchronous Execution Non-blocking async operations designed to avoid runtime errors, even when used within applications where the main thread is fully occupied.
Ergonomic Webhooks Simplified webhook configuration and event dispatching mechanisms.

Installation

Using uv:

uv add zalobot-python

Using pip:

pip install zalobot-python

API Coverage

Method Status
getMe()
getUpdates()
setWebhook()
deleteWebhook()
getWebhookInfo()
sendMessage()
sendPhoto() Planned
sendSticker() Planned
sendChatAction() Planned

Quick Start

import asyncio
from zalobot_python import ZaloBot

bot = ZaloBot("<BOT_TOKEN>")

async def main():
    bot_info = await bot.getMe()
    print(f"Bot: {bot_info.display_name}")

asyncio.run(main())

Documentation

For comprehensive guides, API references, and examples, see the full documentation: Documentation

Topics covered in the docs:

  • Detailed API reference with all methods and parameters
  • Webhook vs Polling comparison
  • Type-safe state management
  • Error handling
  • Advanced usage patterns
  • Complete examples (Echo Bot, Command Handler, Multi-Handler Setup)

License

MIT License

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

zalobot_python-0.2.4.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

zalobot_python-0.2.4-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file zalobot_python-0.2.4.tar.gz.

File metadata

  • Download URL: zalobot_python-0.2.4.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zalobot_python-0.2.4.tar.gz
Algorithm Hash digest
SHA256 ebf50acb51a5a8623e99588b1e14ba20291b7859d45cfc8dc31d53cacfcb3787
MD5 717d384a4a7b9bd0bf94c7a1def7fb9a
BLAKE2b-256 c9a769553be5ac3af47d8827d5bc350003aec43521eed5ac53ca71dbcbab15d8

See more details on using hashes here.

File details

Details for the file zalobot_python-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: zalobot_python-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zalobot_python-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ced72377861aefa9be47846e85ad79039070778ff26357a7fa7584298a22809f
MD5 bda8bf6cdacfdabc636aa19c8d25ad8c
BLAKE2b-256 8874f2ff6a940a72bb1b4863f1d58449e45beea6e5b8e7cdec450ed01d29cb14

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