Skip to main content

Soroushthon

کتابخانهٔ غیررسمی پایتون برای حساب کاربری سروش‌پلاس. این پروژه فورکی از SPlusthon، برگرفته از Telethon است و تحت GPLv3 منتشر می‌شود. به برنامهٔ رسمی سروش‌پلاس وابسته نیست و همهٔ ۳۶۶ درخواست خام همراه بسته روی سرور تأیید نشده‌اند.

نصب

پس از انتشار این نسخه در PyPI:

python -m pip install soroushthon

پایتون ۳٫۹ یا بالاتر لازم است. این فورک در محیط محلی با پایتون ۳٫۱۲ و روی گوشی آزمایشی با پایتون ۳٫۱۳ اجرا شده است؛ همهٔ نسخه‌ها و سیستم‌عامل‌ها آزمون نشده‌اند. نصب وابستگی‌های aiohttp، pyaes و rsa به عهدهٔ pip است.

شروع

import asyncio
from soroushthon import SoroushClient


async def main():
    client = SoroushClient.for_account('main')
    await client.start()  # نخستین اجرا شماره و کد تأیید را می‌پرسد
    try:
        me = await client.me()
        print(me.id, me.first_name)
        dialogs = await client.dialogs(limit=3)
        print('dialogs:', len(dialogs))
    finally:
        await client.disconnect()


asyncio.run(main())

نشست حساب در پوشهٔ خانگی کاربر ذخیره می‌شود؛ فایل .session را منتشر نکنید. SoroushClient.for_account('test') نشست دیگری می‌سازد. متدهای کوتاه مانند send، file، download، poll، vote و react نام دوم متدهای مفصل متناظرند و رفتار مستقلی ندارند. رابط await client(request) برای درخواست‌های خام TL نیز وجود دارد.

ارسال و دانلود پنج قالب رسانهٔ کوچک، سند چندبخشی ۲ مگابایتی و یک سناریوی نظرسنجی/رأی/واکنش در حساب آزمایشی گزارش موفق دارند. دانلود کامل فایل بالای ۱۰ مگابایت، تماس صوتی/تصویری گروهی، بسیاری از متدهای مدیریتی و شاخه‌های احراز هویت هنوز تأیید یا پیاده‌سازی کامل ندارند. ساخت درخواست تماس گروهی به معنی امکان پیوستن یا انتقال صدا نیست.

کد منبع همراه مستندات README.md، INTERACTIONS.md، MEDIA.md، PARITY.md، AUDIT.md و فهرست CAPABILITIES.md در توزیع منبع موجود است. منشأ فورک و مجوزها در NOTICE.md، LICENSE و TELETHON_LICENSE ثبت شده‌اند.

Metadata

Release files for soroushthon 0.2.21

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

Source distribution (sdist)

Source distribution for soroushthon 0.2.21
File Size Uploaded Provenance
soroushthon-0.2.21.tar.gz 805.9 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 1.6 MB

Release files / soroushthon-0.2.21.tar.gz

Download URL soroushthon-0.2.21.tar.gz
Size 805.9 kB
Tags Source
SHA-256 checksum
How to use checksums
57dc1717cbc01ad3545c0dcb355de08baf2b9bb889a36dea6749a85a313f29ad
BLAKE2b-256 checksum
How to use checksums
10035becfdef10be4e98e06c8032893840508cdf4bf9cb886a0a5dbb741ceba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / soroushthon-0.2.21-py3-none-any.whl

Download URL soroushthon-0.2.21-py3-none-any.whl
Size 781.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4305dbd90968307ab22db8e57dc6029b42c36563daa6b073b6fea51cdca610f8
BLAKE2b-256 checksum
How to use checksums
e363f5fef2b7896943646c0b043d1f890b5f389dea207d0c76b3a91f837ff8bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for soroushthon 0.2.21

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.

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