Skip to main content

Run Python code right in your Telegram messages

Project description

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

https://user-images.githubusercontent.com/38432588/181266550-c4640ff1-71f2-4868-ab83-6ea3690c01b6.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tgpy-0.6.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

tgpy-0.6.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file tgpy-0.6.0.tar.gz.

File metadata

  • Download URL: tgpy-0.6.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/36.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.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.8

File hashes

Hashes for tgpy-0.6.0.tar.gz
Algorithm Hash digest
SHA256 817b095b751501950ff917d6b3ebbfa7a573f1c312c1eb2809cd9187f0569189
MD5 7250f75e870a18194ff34128dde92a58
BLAKE2b-256 09a25a418568420b2a3a786d3cab60ebda28490a00989040f4a549903cad8963

See more details on using hashes here.

File details

Details for the file tgpy-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: tgpy-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/36.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.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.8

File hashes

Hashes for tgpy-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed94c90499889b33501ce9d73a37c64c47cfa1f51a4c0fca95d9ec125480ce27
MD5 f10408f30f38425a6dcee3f8410e5824
BLAKE2b-256 1e1721a421ee9fc153067002ab55958ad94e08c2df58c3d8b2ec0f3849da257c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page