TGPy
Run Python code right in your Telegram messages
TGPy is a tool for running Python expressions and Telegram API scripts, built on top of Telethon.
- Do Python calculations in dialogs
- Use code to send messages, save files, analyze chats and more
- Set up functions to automate your Telegram actions
Getting started
Python 3.9+ required. Install TGPy and connect it to your Telegram account:
> pip install tgpy
> tgpy
You’re ready now. Send Python code to any chat, and it will run. Change your message to change the result.
Details on installation: http://tgpy.tmat.me/installation/
New TGPy docs
Basics Guide: All you need to know to start using TGPy.
Extensibility Guide: Special features for advanced usage.
Reference: List of TGPy objects and settings.
Inspiration
TGPy is inspired by FTG and similar userbots. However, the key concept is different: TGPy is totally based on usage of code in Telegram rather than plugging extra modules. This leads both to convenience of single-use scripts and reusage flexibility.
Credits
TGPy is built on Telethon, which allows to integrate Telegram features in Python code.
Basic code transformation (such as auto-return of values) is based on meval.
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for tgpy 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tgpy-0.5.1.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tgpy-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.5 kB
Release files / tgpy-0.5.1.tar.gz
| Download URL | tgpy-0.5.1.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35a39237950bfea7c0ced0745bd125a4c95942928b854ba0a95bfd72402d9975
|
|
BLAKE2b-256 checksum How to use checksums |
116871394b6bcedf4ade96394261e7c89fcc5726f5850a23947351d2d3c4ab84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.6
|
Release files / tgpy-0.5.1-py3-none-any.whl
| Download URL | tgpy-0.5.1-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac2dc4ec333ec1fe0f7d892b44e45ba499df9b85bb71fb095adc01a3b672b716
|
|
BLAKE2b-256 checksum How to use checksums |
dba375b0dcd813cdf84a8d3a4ed791fc6900d84a043cc2392663071fab3c725e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.6
|