Plustik - Soroush Plus Bot API Python Library
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
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.
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
- 🐛 Issue Tracker
- 💬 Discussions
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plustik-0.1.0.tar.gz.
File metadata
- Download URL: plustik-0.1.0.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b66a0d8c26151260e3e77df544fae9cc38c523ce32ad26fdd78a4b1b2e515d8
|
|
| MD5 |
a711c7ba34e43b79ec60582bc7ffa9d2
|
|
| BLAKE2b-256 |
5d7d8bbd1b270184ed8497210f99b582f0dd0e71cd081ba8986c762159701c23
|
File details
Details for the file plustik-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plustik-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03c1ac8155b6cb64125d1baa29de3cb442e47992dbb12bbfbd0a93c5f1b8c6db
|
|
| MD5 |
c0a9215d57bdd8d225daecb54055d0ab
|
|
| BLAKE2b-256 |
8397f649d726a9704988b96ae9e698d925a6c53ef2364241c12f09403891aa34
|