Metadata-Version: 2.4
Name: aiofasttelethonhelper
Version: 0.1.1
Summary: Fully async and parallel file upload/download in Telethon, without blocking the event loop.
Author-email: Aron1cX <aron1cx.dev@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/aron1cx/AIOFastTelethonHelper
Project-URL: Issues, https://github.com/aron1cx/AIOFastTelethonHelper/issues
Project-URL: Source, https://github.com/aron1cx/AIOFastTelethonHelper
Keywords: telethon,fasttelethonhelper,aio,async,telegram,selfbot,userbot
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: setuptools>=80.9.0
Requires-Dist: aiofiles>=25.1.0
Requires-Dist: telethon>=1.41.2
Dynamic: license-file

# AIOFastTelethonHelper

Asynchronous fork of [FastTelethonhelper](https://github.com/MiyukiKun/FastTelethonHelper)  
Provides fully async and parallel file upload/download functions using `aiofiles` and non-blocking I/O.

## 📦 Installation
```bash
pip install aiofasttelethonhelper
```


## ⚙️ Usage Example
```python
from aiofasttelethonhelper.utils import print_progress_bar
from aiofasttelethonhelper import fast_download, fast_upload
from telethon import TelegramClient

client = TelegramClient("session", API_ID, API_HASH)

def custom_progress_callback(**kwargs):
  done, total = kwargs.get('done'), kwargs.get('total')
  print(f"{done}/{total}")

async def main():
  async with client:
      file_path = await fast_download(
        client=client, 
        message=message, 
        file_path="./downloads", # or ./downloads/file.txt
        progress_callback=print_progress_bar
      )

      file = await fast_upload(
        client=client,
        file_path="input.txt",
        progress_callback=custom_progress_callback
      )
      await client.send_file("me", file)
```

## ❤️ Credits
- Tulir Asokan - Original parallel transfer logic in [mautrix-telegram](https://github.com/mautrix/telegram)
- MiyukiKun - Original [helper](https://github.com/MiyukiKun/FastTelethonhelper) creator
- Lonami - Creator of the amazing [Telethon](https://github.com/LonamiWebs/Telethon) library
