Metadata-Version: 2.5
Name: plustik
Version: 0.1.0
Summary: A Python wrapper for the Soroush Plus Bot API
Project-URL: github, https://github.com/daradege/plustik
Project-URL: website, https://plustik.vercel.app
Project-URL: documentation, https://docs.plustik.vercel.app
Author-email: Ali Safamanesh <daradege@proton.me>
License: MIT License
        
        Copyright (c) 2026 Ali Safamanesh
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: aiohttp
Description-Content-Type: text/markdown

# Plustik - Soroush Plus Bot API Python Library

![Plustik Banner](./plustik.svg)

A modern, easy-to-use Python wrapper for the Soroush Plus Bot API that makes building Soroush Plus bots simple and intuitive.

## Features

- 🚀 **Simple & Intuitive** - Clean, Pythonic API design
- 📨 **Full Message Support** - Text, photos, videos, documents, and more
- ⌨️ **Interactive Elements** - Inline keyboards, reply keyboards, and buttons
- 🔄 **Real-time Updates** - Webhook and polling support
- 📁 **File Handling** - Easy upload and download of media files
- 🛡️ **Error Handling** - Comprehensive exception handling
- 📖 **Type Hints** - Full typing support for better development experience
- 🔁 **Async & Sync Support** - Works with both asynchronous and synchronous handlers

## Installation

```bash
pip install plustik
```

## Quick Start

```
from plustik.client import Client
from plustik.objects import Message, UpdatesTypes

bot = Client("YOUR_BOT_TOKEN")

@bot.on_message()
async def message_handler(message: Message):
    await message.reply("Hello, world!")

bot.run()
```

## Examples

### Echo Bot

```
from plustik.client import Client
from plustik.objects import Message, UpdatesTypes

bot = Client("YOUR_BOT_TOKEN")

@bot.on_message()
async def message_handler(message: Message):
    await message.reply(message.text)

bot.run()
```

### Echo Bot (Sync)

```
from plustik.client import Client
from plustik.objects import Message, UpdatesTypes

bot = Client("YOUR_BOT_TOKEN")

@bot.on_message()
def message_handler(message: Message):
    message.reply(message.text)

bot.run()
```

### Inline Keyboard

```
from plustik.client import Client
from plustik.objects import Message, InlineKeyboardMarkup, CopyTextButton

bot = Client("YOUR_BOT_TOKEN")

@bot.on_message()
async def message_handler(message: Message):
    buttons = InlineKeyboardMarkup()
    buttons.add_button("URL", url="https://plustik.vercel.app")
    buttons.add_button("Callback", callback_data="callback")
    buttons.add_row()
    buttons.add_button("WebApp", web_app="https://plustik.vercel.app")
    buttons.add_button("Copy", copy_text_button=CopyTextButton("TEXT"))
    await message.reply("Hello, world!", reply_markup=buttons)

bot.run()
```

### Conversation Bot

```
from plustik.objects import *
from plustik.client import Client, Message, UpdatesTypes

client = Client("YOUR_BOT_TOKEN")

async def handle_message(message: Message):
    if message.text == "/start":
        await message.reply("Hi! I'm a Plustik RoBot!")
        await client.wait_for(UpdatesTypes.MESSAGE)
        await message.reply("Okay! wait_for test completed")

client.add_handler(UpdatesTypes.MESSAGE, handle_message)
client.run()
```

## Core Abilities

- **Message Handling** - Process text, commands, and media messages
- **Callback Queries** - Handle inline keyboard interactions
- **File Operations** - Send and receive photos, videos, documents
- **Chat Management** - Get chat info, member management
- **Custom Keyboards** - Create interactive user interfaces
- **Webhook Support** - Production-ready webhook handling
- **Middleware Support** - Add custom processing layers

## Documentation

For detailed documentation and advanced usage, visit our [documentation site](https://plustik.readthedocs.io).

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

- 📖 [Docs](https://plustik.readthedocs.io)
- 🐛 [Issue Tracker](https://github.com/daradege/plustik/issues)
- 💬 [Discussions](https://github.com/daradege/plustik/discussions)

