Soroush Plus library for Python
Project description
SPlusthon is an asyncio Python 3 MTProto library to interact with Soroush Plus’s API as a user or through a bot account (bot API alternative).
SPlusthon is a fork of Telethon adapted to work with the Soroush Plus messenger. It uses Soroush-specific TL schema (layer 182), DC routing, RSA keys, and WebSocket transport.
What is this?
Soroush Plus is a popular messaging application. This library is meant to make it easy for you to write Python programs that can interact with Soroush Plus. Think of it as a wrapper that has already done the heavy job for you, so you can focus on developing an application.
Installing
pip3 install splusthon
Creating a client
SPlusthon includes default API credentials for Soroush Plus, so you can create a client without obtaining your own keys:
from splusthon import SoroushClient, events, sync
from splusthon.sessions import StringSession
# No api_id or api_hash needed - defaults are included
client = SoroushClient(StringSession())
client.start()
Doing stuff
print(client.get_me().stringify())
client.send_message('username', 'Hello! Talking to you from SPlusthon')
client.send_file('username', '/home/myself/Pictures/holidays.jpg')
client.download_profile_photo('me')
messages = client.get_messages('username')
messages[0].download_media()
@client.on(events.NewMessage(pattern='(?i)hi|hello'))
async def handler(event):
await event.respond('Hey!')
Using an existing session
If you have a saved session string, you can restore it:
from splusthon import SoroushClient
from splusthon.sessions import StringSession
session_string = '1AwA...' # from a previous run
with SoroushClient(StringSession(session_string)) as client:
print(client.get_me())
Links
Soroush Plus: https://web.splus.ir
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file splusthon-1.1.4.tar.gz.
File metadata
- Download URL: splusthon-1.1.4.tar.gz
- Upload date:
- Size: 575.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd5d7068863b26fbc679ffe1ea32c8a9f679500348c2583e2ce5d3937a6d4c16
|
|
| MD5 |
697d2a6e59076bd12e9465f100fec885
|
|
| BLAKE2b-256 |
5df790d286a4fb014a784eca7e5c74eb83ef34feae1af5919e5c460d34ce2309
|
Provenance
The following attestation bundles were made for splusthon-1.1.4.tar.gz:
Publisher:
python-publish.yml on shayanheidari01/SPlusthon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
splusthon-1.1.4.tar.gz -
Subject digest:
bd5d7068863b26fbc679ffe1ea32c8a9f679500348c2583e2ce5d3937a6d4c16 - Sigstore transparency entry: 2156993419
- Sigstore integration time:
-
Permalink:
shayanheidari01/SPlusthon@efd2335266cfe8d341a6a7bab1a603375be7cc2c -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/shayanheidari01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@efd2335266cfe8d341a6a7bab1a603375be7cc2c -
Trigger Event:
release
-
Statement type:
File details
Details for the file splusthon-1.1.4-py3-none-any.whl.
File metadata
- Download URL: splusthon-1.1.4-py3-none-any.whl
- Upload date:
- Size: 651.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce5630fd298fa9ef5bca145b00b2aaf79a3c6f117dc2f3538e1d4a1f218a459f
|
|
| MD5 |
5725751bdecaf76c8b4086f2a6c73a5b
|
|
| BLAKE2b-256 |
c459459ffd0ebb3e9dc9a27e9cf058d93528ba1d81fde9cc54601565ff5ac5fa
|
Provenance
The following attestation bundles were made for splusthon-1.1.4-py3-none-any.whl:
Publisher:
python-publish.yml on shayanheidari01/SPlusthon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
splusthon-1.1.4-py3-none-any.whl -
Subject digest:
ce5630fd298fa9ef5bca145b00b2aaf79a3c6f117dc2f3538e1d4a1f218a459f - Sigstore transparency entry: 2156993457
- Sigstore integration time:
-
Permalink:
shayanheidari01/SPlusthon@efd2335266cfe8d341a6a7bab1a603375be7cc2c -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/shayanheidari01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@efd2335266cfe8d341a6a7bab1a603375be7cc2c -
Trigger Event:
release
-
Statement type: