A tool for transferring files through Telegram
Project description
Telegram Transfer
A Telegram file transfer tool based on Telethon, supporting folder upload, download, and synchronization.
Features
- Folder upload, download, and synchronization
- Resume broken transfers
- Sync support
- Real-time progress display
- File integrity verification
- Session management
- Topic Group support
- Auto-ignore system files (.DS_Store, pycache, etc.)
Installation
- Clone the repository:
git clone https://github.com/ooopus/telegramTransfer.git
cd telegramTransfer
- Install dependencies:
pip install -r requirements.txt
- Configuration:
Create a
config.tomlfile:
[api]
id = ""
hash = ""
[session]
dir = "~/.config/telegramTransfer/sessions"
name = "default"
[transfer]
chunk_size = 2097152
retry_times = 3
timeout = 300
upload_order = "none" # name_asc, name_desc, size_asc, size_desc, none
[logging]
level = "INFO"
[filters]
exclude = [
".DS_Store",
"Thumbs.db",
".git/",
"__pycache__/",
"*.pyc",
".*.swp",
".env"
]
include = ["*"]
Get your API ID and Hash from https://my.telegram.org.
Usage
Basic Commands
# Upload folder
python -m telegramTransfer upload /path/to/folder --to username
# Upload to Topic Group
python -m telegramTransfer upload /path/to/folder --to https://t.me/c/2257928502/336
# Download folder
python -m telegramTransfer download /path/to/folder --from username
# Sync folder to cloud
python -m telegramTransfer upload /path/to/folder --to username --sync
# Sync folder to local
python -m telegramTransfer download /path/to/folder --from username --sync
Command Arguments
folder: Path to the folder to process--to: Target user/channel, supports the following formats:- Numeric ID (e.g., 4639628806)
- Username (e.g., @username)
- Topic Group Link (e.g., https://t.me/c/2257928502/336)
--from: Source user/channel, supports the same formats as --to--caption: File description template, supports the following variables:- {path}: Relative file path
- {size}: File size
- {mtime}: File modification time
--session: Specify session name--new-session: Force create new session--api-id: Telegram API ID--api-hash: Telegram API Hash--sync: Enable sync mode
Advanced Features
-
Resume Broken Transfers:
- Continue from where it left off after interruption
- File integrity verification
- Auto-skip uploaded files
- Auto-handle duplicate files
-
Topic Group Support:
- Upload files to specific Topics
- Auto-handle private channel ID conversion
- Keep messages in correct Topics
-
File Filtering:
- Auto-ignore system and temporary files
- Custom filter rules
- Wildcard pattern matching
-
Session Management:
- Multi-account support
- Session persistence
- Automatic login
- Two-factor authentication support
-
File Verification:
- Auto-verify before and after upload
- Detect file size inconsistencies
- Display detailed verification results
- Auto-handle file conflicts
Notes
- First-time use requires login verification
- Stable network connection recommended
- Large file transfers may be limited by Telegram
- Please comply with Telegram's Terms of Service
- Special characters in filenames are handled correctly
- Sync mode will delete excess files at the destination
License
This project is open-sourced under the GNU General Public License v3 (GPLv3).
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 telegramtransfer-0.0.0.dev202502201203.tar.gz.
File metadata
- Download URL: telegramtransfer-0.0.0.dev202502201203.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9acf6faf236eb7d1aeaba83e3160362425f945fd279ca678098d7c50a31f73fe
|
|
| MD5 |
e6b3fced62b66d5ed4c3d221a46cbf26
|
|
| BLAKE2b-256 |
9b8a602a6cc803bf2c867e369cc28703885b0b3df0b34f5362354f061933a7b9
|
Provenance
The following attestation bundles were made for telegramtransfer-0.0.0.dev202502201203.tar.gz:
Publisher:
python-publish.yml on ooopus/telegramTransfer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
telegramtransfer-0.0.0.dev202502201203.tar.gz -
Subject digest:
9acf6faf236eb7d1aeaba83e3160362425f945fd279ca678098d7c50a31f73fe - Sigstore transparency entry: 172947351
- Sigstore integration time:
-
Permalink:
ooopus/telegramTransfer@dd2caa8fde4f3d30c626e95af0980758ddebd685 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ooopus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dd2caa8fde4f3d30c626e95af0980758ddebd685 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl.
File metadata
- Download URL: telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d63d9dd4058ff562ab39d179148948f7299ad99c6a75fe0057a564881af728
|
|
| MD5 |
c836c0e5c87c24fca026aa6f5991c0c3
|
|
| BLAKE2b-256 |
f4a609bd7668a16409e9d8aae09734e20169a4c3924327bf33e429300dd957d0
|
Provenance
The following attestation bundles were made for telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl:
Publisher:
python-publish.yml on ooopus/telegramTransfer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl -
Subject digest:
16d63d9dd4058ff562ab39d179148948f7299ad99c6a75fe0057a564881af728 - Sigstore transparency entry: 172947355
- Sigstore integration time:
-
Permalink:
ooopus/telegramTransfer@dd2caa8fde4f3d30c626e95af0980758ddebd685 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ooopus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dd2caa8fde4f3d30c626e95af0980758ddebd685 -
Trigger Event:
workflow_dispatch
-
Statement type: