Python License: MIT Code style: black PyPI version
A high-performance, fully asynchronous Python SDK for the ManyChat API. Built with modern Python practices, type safety, and developer experience in mind. Perfect for building scalable chatbots, automation workflows, and marketing tools.
- 100% Asynchronous β Built with
asynciofor maximum performance - Type Safe β Full type hints and Pydantic validation
- Production Ready β Battle-tested in high-traffic environments
- Complete API Coverage β All ManyChat endpoints implemented
- Developer Friendly β Intuitive API design with detailed documentation
pip install manychat-sdk # or with poetry poetry add manychat-sdk π Documentation Full Documentation API Reference π‘ Quick Start 1. Initialize Client python Copy Edit from manychat import ManyChatClient async def main(): async with ManyChatClient(api_key="your_api_key") as client: # Start using the client ... 2. Get Page Information python Copy Edit from manychat.api.facebook import get_page_info from manychat import ManyChatClient async def show_page_info(): async with ManyChatClient() as client: page = await get_page_info(client) print(f"Page: {page.data.name}") print(f"Category: {page.data.category}") 3. Manage Subscribers python Copy Edit from manychat.api.facebook.subscriber import get_subscriber_info, add_tag_by_name from manychat import ManyChatClient async def tag_vip_customer(subscriber_id: str): async with ManyChatClient() as client: # Get subscriber details subscriber = await get_subscriber_info(client, subscriber_id=subscriber_id) # Add VIP tag await add_tag_by_name( client, subscriber_id=subscriber_id, tag_name="VIP" ) π API Endpoints Facebook API get_page_info() β Get page details and statistics get_tags() β List all available tags set_bot_fields() β Update bot configuration Subscriber Management get_subscriber_info() β Retrieve subscriber details add_tag_by_name() β Tag subscribers remove_tag() β Remove tags set_custom_field() β Update subscriber fields π οΈ Advanced Usage Error Handling python Copy Edit from manychat.exceptions import ManyChatRateLimitError, ManyChatAPIError from manychat import ManyChatClient from manychat.api.facebook import get_page_info async def safe_call(): try: async with ManyChatClient() as client: await get_page_info(client) except ManyChatRateLimitError as e: print(f"Rate limited! Try again in {e.retry_after} seconds") except ManyChatAPIError as e: print(f"API Error: {e}") Configuration Options python Copy Edit from manychat import ManyChatConfig config = ManyChatConfig( api_key="your_api_key", timeout=30, # seconds max_retries=3, base_url="https://api.manychat.com" ) π§ͺ Testing bash Copy Edit # Run tests pytest tests/ -v # With coverage pytest --cov=manychat tests/ π€ Contributing We welcome contributions! Please see our Contributing Guide for details. π License This project is licensed under the MIT License β see the LICENSE file for details.