Skip to main content
NSplusthon Logo

NSplusthon

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


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

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

pip install git+https://github.com/Amogrotex/NSplusthon.git

شروع سریع

from nsplusthon import SoroushClient
from nsplusthon.sessions import StringSession

client = SoroushClient(StringSession())

client.start()

نمونه

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

ارسال فایل

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

دانلود رسانه

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

Session ذخیره‌شده

from nsplusthon import SoroushClient
from nsplusthon.sessions import StringSession

session = "1AwA..."

with SoroushClient(StringSession(session)) as client:
    print(client.get_me())

وابستگی‌ها

  • aiohttp
  • pyaes
  • rsa

اختیاری:

  • cryptg (افزایش سرعت رمزنگاری)

مستندات

مستندات کامل پروژه:

https://Amogrotex.github.io/NSplusthon/

مجوز

این پروژه تحت مجوز GNU GPL v3 منتشر شده است.


NSplusthon is maintained by AmoGrotex

Forked from SPlusthon by Shayan Heidari — which is itself based on Telethon.

Metadata

Release files for NSplusthon 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 NSplusthon 1.1.4
File Size Uploaded
nsplusthon-1.1.4.tar.gz 588.7 kB Details

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / nsplusthon-1.1.4.tar.gz

Download URL nsplusthon-1.1.4.tar.gz
Size 588.7 kB
Tags Source
SHA-256 checksum
How to use checksums
606da78153d89d7c934850af599a94eb518cf3b1f5e3111ff4899515e2124e6d
BLAKE2b-256 checksum
How to use checksums
ed63a685c2d3a0fe96df0abe673a1ac2c8440f923ea9e7104b8fa35ea192f968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL nsplusthon-1.1.4-py3-none-any.whl
Size 664.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdb0cbf013f6db46c65c0a7a975a1ef3ef87928a7943c954dcca1743d32eefe6
BLAKE2b-256 checksum
How to use checksums
778a54521b19ef9174f98c00c56ddbc4d37926134d1dee65038c344bc85fc944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.8.2

2 release files

1.8.1

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

This release

1.1.4 This release

2 release files

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