Skip to main content
Samyarpy Logo

Samyarpy

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

Documentation • PyPI • GitHub • Soroush Plus


کتابخانه Samyarpy یک کتابخانه مدرن و قدرتمند برای 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 samyarpy

یا آخرین نسخه توسعه:

pip install git+https://github.com/shayanheidari01/SPlusthon.git

شروع سریع

from samyarpy import SoroushClient
from samyarpy.sessions import StringSession

client = SoroushClient(StringSession())

client.start()

نمونه

from samyarpy import SoroushClient, events
from samyarpy.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",
    "سلام از Samyarpy ❤️"
)

ارسال فایل

client.send_file(
    "username",
    "/path/image.jpg"
)

دانلود رسانه

message = client.get_messages("username", limit=1)[0]
message.download_media()

Session ذخیره‌شده

from samyarpy import SoroushClient
from samyarpy.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

Metadata

Release files for samyarpy 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for samyarpy 1.1.4
File Size Uploaded Provenance
samyarpy-1.1.4.tar.gz 579.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for samyarpy 1.1.4
File Interpreter ABI Platform
samyarpy-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / samyarpy-1.1.4.tar.gz

Download URL samyarpy-1.1.4.tar.gz
Size 579.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c0c9ed488a35c81b29d6ca2cacd0949e9e0b1de47fcb625fa3a59299c2c97416
BLAKE2b-256 checksum
How to use checksums
974827098908cf64acffa9386358fb16a62a8d4579d7375f2b27d2d24e8e717f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / samyarpy-1.1.4-py3-none-any.whl

Download URL samyarpy-1.1.4-py3-none-any.whl
Size 652.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95fb8e7765f19bcf42df178dbc9fb1ef75e4338ad8ffcfedf8b8ecd94793e2fa
BLAKE2b-256 checksum
How to use checksums
8e51fbed68c9bc8c4b9fb10ad1bf605639b021149066987c0c91418954966bb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for samyarpy 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page