Metadata-Version: 2.4
Name: Wyngthon
Version: 1.0.2
Summary: Wyng library for Python
Home-page: https://github.com/P3dro-Im/Wyngthon
Download-URL: https://github.com/P3dro-Im/Wyngthon/releases
Author: Pedro
License: GPL-3.0
Keywords: 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.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pyaes
Requires-Dist: rsa
Requires-Dist: aiohttp
Provides-Extra: cryptg
Requires-Dist: cryptg; extra == "cryptg"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<div align="center">

<img src="https://raw.githubusercontent.com/P3dro-Im/Wyngthon/main/logo.svg" width="180" alt="Wyngthon Logo">

<h1>Wyngthon</h1>

<p>
  <strong>Asynchronous Python library for the Wyng API</strong>
</p>

<p>
  Built on <strong>Telethon</strong> and fully adapted for the
  <strong>Wyng</strong> protocol.
</p>

<p>

<a href="https://pypi.org/project/wyngthon/">
  <img src="https://img.shields.io/pypi/v/wyngthon.svg?style=for-the-badge" alt="PyPI">
</a>

<a href="https://pypi.org/project/wyngthon/">
  <img src="https://img.shields.io/pypi/pyversions/wyngthon.svg?style=for-the-badge" alt="Python">
</a>

<a href="https://github.com/P3dro-Im/Wyngthon/blob/main/LICENSE">
  <img src="https://img.shields.io/github/license/P3dro-Im/Wyngthon?style=for-the-badge" alt="License">
</a>

<a href="https://github.com/P3dro-Im/Wyngthon/stargazers">
  <img src="https://img.shields.io/github/stars/P3dro-Im/Wyngthon?style=for-the-badge" alt="Stars">
</a>

<a href="https://github.com/P3dro-Im/Wyngthon/issues">
  <img src="https://img.shields.io/github/issues/P3dro-Im/Wyngthon?style=for-the-badge" alt="Issues">
</a>

</p>

<p>

<a href="https://p3dro-im.github.io/Wyngthon/"><strong>Documentation</strong></a>
•
<a href="https://pypi.org/project/wyngthon/"><strong>PyPI</strong></a>
•
<a href="https://github.com/P3dro-Im/Wyngthon"><strong>GitHub</strong></a>
•
<a href="https://web.wyng.ir"><strong>Wyng</strong></a>

</p>

</div>

---

کتابخانه Wyngthon یک کتابخانه مدرن و قدرتمند برای **Python 3** است که بر پایه
**asyncio** توسعه یافته و امکان تعامل مستقیم با **API پیام‌رسان وینگ**
را به‌عنوان **کاربر** یا **ربات** فراهم می‌کند.

این پروژه بر پایه **Telethon** توسعه یافته و برای معماری اختصاصی وینگ
بازطراحی شده است. کتابخانه از **TL Schema (Layer 229)**،
**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:

```bash
pip install wyngthon
```

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

```bash
pip install git+https://github.com/P3dro-Im/Wyngthon.git
```

## شروع سریع

```python
from wyngthon import WyngClient
from wyngthon.sessions import StringSession

client = WyngClient(StringSession())

client.start()
```

## نمونه

```python
from wyngthon import WyngClient, events
from wyngthon.sessions import StringSession

client = WyngClient(StringSession())

@client.on(events.NewMessage)
async def handler(event):
    await event.reply("سلام 👋")

client.start()
client.run_until_disconnected()
```

ارسال پیام

```python
client.send_message(
    "username",
    "سلام از Wyngthon ❤️"
)
```

ارسال فایل

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

دانلود رسانه

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

## Session ذخیره‌شده

```python
from wyngthon import WyngClient
from wyngthon.sessions import StringSession

session = "1AwA..."

with WyngClient(StringSession(session)) as client:
    print(client.get_me())
```

## وابستگی‌ها

- aiohttp
- pyaes
- rsa

اختیاری:

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

## مستندات

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

https://p3dro-im.github.io/Wyngthon/

## مجوز

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

این پروژه در ابتدا فورکی از [SPlusthon](https://github.com/shayanheidari01/SPlusthon) ساخته‌ی Shayan Heidari (مجوز GPLv3) بوده و بخش‌هایی از آن از **Telethon** (مجوز MIT) گرفته شده است؛ جزئیات در فایل [NOTICE](https://github.com/P3dro-Im/Wyngthon/blob/main/NOTICE) آمده است.

---

<div align="center">

**Made with ❤️ by Pedro**

https://github.com/P3dro-Im

</div>
