Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

elizaos-plugin-zalo (Python)

Python implementation of the Zalo Official Account Bot API plugin for elizaOS.

Installation

pip install elizaos-plugin-zalo

Usage

import asyncio
from elizaos_plugin_zalo import ZaloService, ZaloConfig

async def main():
    # Load config from environment
    config = ZaloConfig.from_env()
    
    # Create and start service
    service = ZaloService(config)
    await service.start()
    
    # Send a message
    message_id = await service.send_message("user_id", "Hello from elizaOS!")
    print(f"Sent message: {message_id}")
    
    # Stop service
    await service.stop()

asyncio.run(main())

Configuration

Set the following environment variables:

  • ZALO_APP_ID - Zalo App ID (required)
  • ZALO_SECRET_KEY - Zalo Secret Key (required)
  • ZALO_ACCESS_TOKEN - OAuth access token (required)
  • ZALO_REFRESH_TOKEN - OAuth refresh token (optional)
  • ZALO_WEBHOOK_URL - Webhook URL (required for webhook mode)
  • ZALO_USE_POLLING - Set to true for polling mode (optional)
  • ZALO_ENABLED - Set to false to disable (optional)
  • ZALO_PROXY_URL - HTTP proxy URL (optional)

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy elizaos_plugin_zalo

# Linting
ruff check elizaos_plugin_zalo
ruff format elizaos_plugin_zalo

Metadata

Release files for elizaos-plugin-zalo 2.0.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elizaos-plugin-zalo 2.0.0a5
File Size Uploaded
elizaos_plugin_zalo-2.0.0a5.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elizaos-plugin-zalo 2.0.0a5
File Interpreter ABI Platform
elizaos_plugin_zalo-2.0.0a5-py3-none-any.whl Python 3 none any Details

Total release size: 26.4 kB

Release files / elizaos_plugin_zalo-2.0.0a5.tar.gz

Download URL elizaos_plugin_zalo-2.0.0a5.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b03fd622d63da540592e52546103c14e77454e38f3c1824a7618faa2e4fffa09
BLAKE2b-256 checksum
How to use checksums
8ae03ddd602a5d0b77085b941162d066b534ba64b1027d1a964c50a593d5e763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / elizaos_plugin_zalo-2.0.0a5-py3-none-any.whl

Download URL elizaos_plugin_zalo-2.0.0a5-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
384b16a5c02b13f4419a49fd304fc4bbadf13d1b2fc4df53f12afa29767bfa8e
BLAKE2b-256 checksum
How to use checksums
b05cc015e1acbc940391da809bf2012df0143a9fac884e2ec894ac1836489c95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page