Fully async and parallel file upload/download in Telethon, without blocking the event loop.
Project description
AIOFastTelethonHelper
Asynchronous fork of FastTelethonhelper
Provides fully async and parallel file upload/download functions using aiofiles and non-blocking I/O.
📦 Installation
pip install aiofasttelethonhelper
⚙️ Usage Example
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
- MiyukiKun - Original helper creator
- Lonami - Creator of the amazing Telethon library
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 aiofasttelethonhelper-0.1.3.tar.gz.
File metadata
- Download URL: aiofasttelethonhelper-0.1.3.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
001e2e46c75af5f6aaba5423a5ed01ec9b89c6de5a6e0d92456b3adf01c9981b
|
|
| MD5 |
6c942dc79c2e2a5c4fe420268314e883
|
|
| BLAKE2b-256 |
ba0e1a86728691f50c4bb413e43357f95ab86f9318e755dd4485c930f7103f9f
|
Provenance
The following attestation bundles were made for aiofasttelethonhelper-0.1.3.tar.gz:
Publisher:
python-publish.yml on aron1cx/AIOFastTelethonHelper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiofasttelethonhelper-0.1.3.tar.gz -
Subject digest:
001e2e46c75af5f6aaba5423a5ed01ec9b89c6de5a6e0d92456b3adf01c9981b - Sigstore transparency entry: 779890763
- Sigstore integration time:
-
Permalink:
aron1cx/AIOFastTelethonHelper@b3b25c94e32414559a6451fb696de9d5f20003d8 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/aron1cx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b3b25c94e32414559a6451fb696de9d5f20003d8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aiofasttelethonhelper-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aiofasttelethonhelper-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
379e8319dbc019f70b676be54cc70c37ca8a4b5e6235738887d9e530be960a9d
|
|
| MD5 |
a419279f0e1dc6524631b1b5e3c3ad8e
|
|
| BLAKE2b-256 |
dfcbe7853eed81bc67b19caa78a4863896308df35965785f36db8731f14401cf
|
Provenance
The following attestation bundles were made for aiofasttelethonhelper-0.1.3-py3-none-any.whl:
Publisher:
python-publish.yml on aron1cx/AIOFastTelethonHelper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiofasttelethonhelper-0.1.3-py3-none-any.whl -
Subject digest:
379e8319dbc019f70b676be54cc70c37ca8a4b5e6235738887d9e530be960a9d - Sigstore transparency entry: 779890766
- Sigstore integration time:
-
Permalink:
aron1cx/AIOFastTelethonHelper@b3b25c94e32414559a6451fb696de9d5f20003d8 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/aron1cx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b3b25c94e32414559a6451fb696de9d5f20003d8 -
Trigger Event:
release
-
Statement type: