Metadata-Version: 2.4
Name: techlabtools
Version: 2.0.0
Summary: Fast, parallel Telegram file transfer for Telethon (multi-connection upload/download).
Author: TechLaboratory
License: Proprietary
Project-URL: Homepage, https://github.com/sagarku19/package1-techlabtools-telethron
Project-URL: Repository, https://github.com/sagarku19/package1-techlabtools-telethron
Project-URL: Issues, https://github.com/sagarku19/package1-techlabtools-telethron/issues
Keywords: telegram,telethon,fast,upload,download,mtproto,parallel
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: telethon>=1.24
Dynamic: license-file

# techlabtools

**Fast, parallel Telegram file transfer for Telethon** — developed by **TechLaboratory**.

Telethon moves files over one connection. `techlabtools` opens several MTProto connections to the
data center and transfers file chunks in parallel — typically **3–6× faster** for large files.

**New in 2.0.0 (robustness):** failed parts are retried automatically (backoff + flood-wait aware),
connections are always released even if a transfer errors, and progress is guaranteed to reach 100%.

## Install
```bash
pip install techlabtools
```

## Use
```python
from techlabtools import fast_upload, fast_download

# Upload (returns an InputFile for client.send_file)
uploaded = await fast_upload(client, "big.mp4", reply=msg,
                             progress_bar_function=lambda d, t: f"{d*100//t}%")
await client.send_file(chat, uploaded, caption="done")

# Download (returns the saved path)
path = await fast_download(client, message,
                           progress_bar_function=lambda d, t: f"{d*100//t}%")
```

- `fast_upload(client, file_path, reply=None, name=None, progress_bar_function=None, connection_count=None)`
- `fast_download(client, message, reply=None, download_folder=None, name=None, progress_bar_function=None, connection_count=None)`

Progress callbacks may be sync or async and are throttled (~3s). Connection count auto-scales to
file size (cap 20, and never more than the number of parts); override with `connection_count=`.
Transient failures are retried automatically.

Full docs: see **DOCUMENTATION.md**. Requires Python 3.8+ and `telethon>=1.24`.

## License
© 2026 TechLaboratory — proprietary. All rights reserved. See `LICENSE`.
