Skip to content

Repository files navigation

SPlusthon Logo

SPlusthon

Asynchronous Python library for the Soroush Plus API

Built on Telethon and fully adapted for the Soroush Plus protocol.

PyPI Python License Stars Issues Build

DocumentationPyPIGitHubSoroush 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.git

شروع سریع

from 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()

Session ذخیره‌شده

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

https://github.com/shayanheidari01

About

Soroush Plus library for Python

Topics

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages