Metadata-Version: 2.4
Name: spluspy
Version: 2.0.0
Summary: Soroush Plus library for Python
Home-page: https://github.com/Itskillmaster/spluspy
Download-URL: https://github.com/Itskillmaster/spluspy/releases
Author: AliMirshekari And Soroush Fathi
Author-email: dramff1@gmail.com
License: GPL-3.0
Keywords: soroush plus telegram api chat client library messaging mtproto
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Chat
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.5
Description-Content-Type: text/x-rst
Requires-Dist: pyaes
Requires-Dist: rsa
Requires-Dist: websockets
Provides-Extra: cryptg
Requires-Dist: cryptg; extra == "cryptg"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

SPlusPy
=======

**SPlusPy** is an asynchronous Python 3 MTProto library for interacting
with the `Soroush Plus <https://web.splus.ir>`_ platform as either a
user account or a bot account (an alternative to the official Bot API).

Built as a fork of Telethon, SPlusPy has been adapted specifically for
the Soroush Plus ecosystem. It supports the native Soroush Plus TL
schema (Layer 182), DC routing, RSA encryption, and WebSocket transport,
providing a modern and reliable developer experience.

.. note::

   SPlusPy is an unofficial third-party library. Please use it
   responsibly and ensure your applications comply with Soroush Plus's
   Terms of Service. Improper use may result in account restrictions.

Features
--------

- Fully asynchronous (``asyncio``)
- User and bot account support
- Native MTProto implementation
- WebSocket transport
- RSA encryption
- Soroush Plus TL schema (Layer 182)
- Based on the Telethon architecture
- Modern Python 3 support
- Convenience methods for sending files, photos, audio, video
- Chat management: ban, unban, kick, pin/unpin messages
- Admin and permissions management
- High-performance encryption with optional ``cryptg`` support

What is SPlusPy?
----------------

`Soroush Plus <https://web.splus.ir>`_ is a popular messaging platform.

SPlusPy provides a clean, Pythonic interface for communicating with the
Soroush Plus MTProto API. Instead of implementing the protocol yourself,
you can focus entirely on building your application while SPlusPy
handles authentication, networking, serialization, and protocol details.

Installing
----------

Install the latest version from PyPI:

.. code-block:: sh

   pip install -U spluspy

For faster encryption (recommended):

.. code-block:: sh

   pip install cryptg

Creating a client
-----------------

SPlusPy includes the default Soroush Plus API credentials, so there is
no need to obtain your own ``api_id`` or ``api_hash``.

.. code-block:: python

   import asyncio
   from spluspy import SoroushClient

   bot = SoroushClient('my_bot')

   @bot.on_message(incoming=True)
   async def handler(event):
       if event.is_private and event.raw_text == 'Hello':
           await event.reply('Hi!')

   async def main():
       await bot.start()
       print('Bot is running!')
       await bot.run_until_disconnected()

   asyncio.run(main())

Quick Examples
--------------

Sending messages and files:

.. code-block:: python

   # Send a text message
   await client.send_message('username', 'Hello!')

   # Send a photo
   await client.send_photo(chat, 'photo.jpg', caption='Check this out!')

   # Send audio/music
   await client.send_audio(chat, 'song.mp3')

   # Send a video
   await client.send_video(chat, 'video.mp4')

   # Send a document
   await client.send_document(chat, 'file.pdf')

Chat management:

.. code-block:: python

   # Ban a user
   await client.ban_chat_member(chat, user)

   # Unban a user
   await client.unban_chat_member(chat, user)

   # Pin a message
   await client.pin_message(chat, message)

   # Unpin all messages
   await client.unpin_all_messages(chat)

Documentation
-------------

More examples and complete documentation will be available in future
releases.

License
-------

SPlusPy is open-source software distributed under its respective
license.
