A Telegram bot that can stream Telegram files to users over HTTP.
Project description
tgfilestream
A Telegram bot that can stream Telegram files to users over HTTP.
Setup
Install dependencies (see requirements.txt), configure
environment variables (see below) and run with python3 -m tgfilestream.
A reverse proxy is recommended to add TLS. When using a reverse proxy, keep
HOST as-is, but add the publicly accessible URL to PUBLIC_URL. The URL
should include the protocol, e.g. https://example.com.
Deploy to Render/Heroku
Click here to learn how to deploy this bot to Heroku or Render.
Environment variables
TG_API_ID(required) - Your Telegram API ID.TG_API_HASH(required) - Your Telegram API hash.TG_BOT_TOKEN(defaults totgfilestream) - Your Telegram Bot Token.TG_SESSION_NAME(defaults totgfilestream) - The name of the Telethon session file to use.PORT(defaults to8080) - The port to listen at.HOST(defaults tolocalhost) - The host to listen at.PUBLIC_URL(defaults tohttp://localhost:8080) - The prefix for links that the bot gives.TRUST_FORWARD_HEADERS(defaults to false) - Whether or not to trust X-Forwarded-For headers when logging requests.DEBUG(defaults to false) - Whether or not to enable extra prints.LOG_CONFIG- Path to a Python basic log config. OverridesDEBUG.REQUEST_LIMIT(default 5) - The maximum number of requests a single IP can have active at a time.CONNECTION_LIMIT(default 20) - The maximum number of connections to a single Telegram datacenter.CACHE_SIZE(defaults to 128) - The number of FileInfo objects (messages) to cache.
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 tgfilestream-0.1.1.tar.gz.
File metadata
- Download URL: tgfilestream-0.1.1.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22af43cc3c33b2e6c1b65840677c54feed6a15ca9c18bba97b09ca53c9f0a02a
|
|
| MD5 |
9115b1263bfdbee56cd3594e532359aa
|
|
| BLAKE2b-256 |
1d9ec526157e15a0f8cda992af612b185dccd5a9eefc3d089aeb5004e3f28662
|
File details
Details for the file tgfilestream-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tgfilestream-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7852b1c2865c9d5be5be3f436d71426561f92845c6a9cb8bdfa765ffb3b3416d
|
|
| MD5 |
be22aaa4b8e65ec63c919e5317eaa1f9
|
|
| BLAKE2b-256 |
2e8a31b55c07884e8b81a0dfe604100007ecd2939dc173bc68235ab685749654
|