Run Python code right in your Telegram messages
Project description
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.
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
File details
Details for the file tgpy-0.5.0.tar.gz
.
File metadata
- Download URL: tgpy-0.5.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using 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.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f239099e4a20b9bfa4996106a3c3693c778064dd36692e49560a6eb59df174d |
|
MD5 | 6d894b5b3fb457629b9af62f5ef4c542 |
|
BLAKE2b-256 | 3d6eff25b062f0e8bd9b6e7d125167295204ddd14524bd630b34aa9f8fc808f9 |
File details
Details for the file tgpy-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: tgpy-0.5.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using 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.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16c0d69ea09008f0877858dd3fc7a16475ec5fbce16dd392499b272c2b4bb8df |
|
MD5 | ff3e41debbf1720301bb28f26487d60a |
|
BLAKE2b-256 | 7b38f7fe83f38e77c5a15a3129fee8f0f8c7ebb7da4ec501de7ee756b5a0f9c0 |