Metadata-Version: 2.4
Name: elizaos-plugin-zalo
Version: 2.0.0a5
Summary: Zalo Official Account Bot API plugin for elizaOS - Python implementation
Project-URL: Homepage, https://github.com/elizaos/eliza
Project-URL: Documentation, https://elizaos.ai/docs
Project-URL: Repository, https://github.com/elizaos/eliza
Author: elizaOS Contributors
License-Expression: MIT
Keywords: agents,ai,bot,chat,elizaos,vietnam,zalo
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28.0
Requires-Dist: pydantic>=2.10.0
Provides-Extra: dev
Requires-Dist: mypy>=1.14.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: python-dotenv>=1.0.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Description-Content-Type: text/markdown

# elizaos-plugin-zalo (Python)

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

## Installation

```bash
pip install elizaos-plugin-zalo
```

## Usage

```python
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

```bash
# 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
```
