Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.99 KB

README.md

File metadata and controls

44 lines (27 loc) · 1.99 KB

TGPy

PyPI Docker Image Version (latest semver) Open issues Docs

Run Python code right in your Telegram messages. TGPy is a tool built on top of Telethon.

  • Calculate right in chats
  • Send messages, save files, analyze chats — with simple code
  • Set up functions to automate your Telegram actions

Basics Guide · Extensibility Guide · Reference

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

video_example.mp4

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.