Asynchronous Python library for the Soroush Plus API
Built on Telethon and fully adapted for the Soroush Plus protocol.
Documentation • PyPI • GitHub • Soroush Plus
کتابخانه SPlusthon یک کتابخانه مدرن و قدرتمند برای Python 3 است که بر پایه asyncio توسعه یافته و امکان تعامل مستقیم با API پیامرسان سروش پلاس را بهعنوان کاربر یا ربات فراهم میکند.
این پروژه بر پایه Telethon توسعه یافته و برای معماری اختصاصی سروش پلاس بازطراحی شده است. کتابخانه از TL Schema (Layer 182)، RSA Encryption، DC Routing و WebSocket Transport پشتیبانی میکند و تجربهای سریع، پایدار و نزدیک به کلاینت رسمی ارائه میدهد.
Note: لطفاً هنگام استفاده از این کتابخانه، قوانین و شرایط استفاده سروش پلاس را رعایت کنید. مسئولیت استفاده از این پروژه بر عهده کاربر است.
- پشتیبانی کامل از حساب کاربری و ربات
- مبتنی بر asyncio با کارایی بالا
- امکان استفاده بهصورت Sync و Async
- پشتیبانی کامل از TL Schema اختصاصی سروش
- مدیریت Session و StringSession
- پشتیبانی از WebSocket
- پشتیبانی از DC Routing
- رمزنگاری RSA و AES
- بدون نیاز به API ID و API Hash
- API مشابه Telethon برای مهاجرت آسان
از PyPI:
pip install splusthonیا آخرین نسخه توسعه:
pip install git+https://github.com/shayanheidari01/SPlusthon.gitfrom splusthon import SoroushClient
from splusthon.sessions import StringSession
client = SoroushClient(StringSession())
client.start()from splusthon import SoroushClient, events
from splusthon.sessions import StringSession
client = SoroushClient(StringSession())
@client.on(events.NewMessage)
async def handler(event):
await event.reply("سلام 👋")
client.start()
client.run_until_disconnected()ارسال پیام
client.send_message(
"username",
"سلام از SPlusthon ❤️"
)ارسال فایل
client.send_file(
"username",
"/path/image.jpg"
)دانلود رسانه
message = client.get_messages("username", limit=1)[0]
message.download_media()from splusthon import SoroushClient
from splusthon.sessions import StringSession
session = "1AwA..."
with SoroushClient(StringSession(session)) as client:
print(client.get_me())- aiohttp
- pyaes
- rsa
اختیاری:
- cryptg (افزایش سرعت رمزنگاری)
مستندات کامل پروژه:
https://shayanheidari01.github.io/SPlusthon/
این پروژه تحت مجوز GNU GPL v3 منتشر شده است.
Made with ❤️ by Shayan Heidari