Skip to main content

Goygram: unified Telegram runtime on Python and Rust

Project description

Python 3.14+ Rust Core License: AGPL v3 Telegram API Security

GoyGram

Ultimate split-brain Telegram framework (Python + Rust core) built for production-grade speed, control, and maximum OpSec.

Key Features

  • Split-brain architecture: ergonomic Python layer + blazing-fast Rust extension.
  • Session Eater: aggressive in-memory cleanup (zeroize strategy).
  • Vault AES-GCM: encrypted local session bootstrap.
  • TUI auth flow: terminal-first authorization workflow.
  • Proxy support: route traffic through your required network topology.
  • Dual transport: Bot API + MTProto in one app runtime.

Installation

pip install goygram

Quick Start

1) Bot API (token)

import asyncio
from goygram import GoyGram, filters

app = GoyGram(bot_token="123456:ABC_TOKEN")

@app.on_msg(filt=filters.text)
async def echo(msg):
    await msg.reply("Hello from Bot API")

asyncio.run(app.run())

2) MTProto (no bot token)

import asyncio
from goygram import GoyGram

app = GoyGram(mt_host="149.154.167.50", mt_port=443)

@app.on_cmd("ping")
async def ping(msg):
    await msg.reply("pong from MTProto")

asyncio.run(app.run())

Dynamic API & Methods

GoyGram now supports all Telegram methods out of the box with dynamic dispatch:

  • Call Bot API methods directly even if they are not explicitly hardcoded:
    • await app.sendDocument(chat_id=..., document=...)
    • await app.getChat(chat_id=...)
    • await app.getUpdates(timeout=30)
  • Snake-case also works and is converted to Bot API method names:
    • await app.send_document(chat_id=..., document=...) -> sendDocument
  • MTProto actions are available with mt_ prefix:
    • await app.mt_get_dialogs(limit=50)
    • await app.mt_get_chat_full(chat_id=...)

This behavior is implemented through dynamic method resolution in the client core (__getattr__) and transport-aware request routing.

Developer Tools (Help)

Use built-in introspection tools:

app.help()            # pretty DX overview in console
print(dir(app))       # inspect available shortcuts + dynamic entries

or:

from goygram.utils import print_methods
print_methods(app)

With type hints on key event objects (MsgObj, CbObj, MemberObj, PollObj) and filter primitives, modern IDE autocomplete works much better out of the box.

Filters

goygram.filters supports composable boolean operators:

from goygram import filters

smart_filter = filters.text & ~filters.me
another = filters.text | filters.me

@app.on_msg(filt=smart_filter)
async def handler(msg):
    await msg.reply("Filtered")

License

CopyLeft 2026 github.com/sepiol026-wq | telegram:@samsepi0l_ovf. Licensed under AGPLv3.

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

goygram-0.3.6.tar.gz (22.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

goygram-0.3.6-cp311-abi3-win_amd64.whl (157.9 kB view details)

Uploaded CPython 3.11+Windows x86-64

goygram-0.3.6-cp311-abi3-manylinux_2_34_x86_64.whl (242.2 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

goygram-0.3.6-cp311-abi3-macosx_11_0_arm64.whl (224.6 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file goygram-0.3.6.tar.gz.

File metadata

  • Download URL: goygram-0.3.6.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for goygram-0.3.6.tar.gz
Algorithm Hash digest
SHA256 9123eba690de6c9e90ee2598b190eacc85e30a73c849b3f67b2e2e8c2b549268
MD5 f48e8ec685938733fa13a930aaa7647a
BLAKE2b-256 400285c853dd2a0b9c4f1a879c1aa8533d9f72ff960f4122d508a9346979f5ca

See more details on using hashes here.

File details

Details for the file goygram-0.3.6-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: goygram-0.3.6-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 157.9 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for goygram-0.3.6-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 72925325fa1ea94c8a6abc6c3d566deaee9e93610bce707006d56d5678e4fe2e
MD5 ee0f681a8dcf2e89219eaa2461efe29b
BLAKE2b-256 371e137a5bd2ec4778811b5cc7faec99eeb47d2def544ebf0b9c2bac83a221d8

See more details on using hashes here.

File details

Details for the file goygram-0.3.6-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for goygram-0.3.6-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 853eb8b675bbcb2532304a6b3a5382947ccca1a44b5d704999489207d2f9faf0
MD5 3b48565474ca9d4c17c7959a102cc1c8
BLAKE2b-256 cad08cd5e29105871b3868eb72c9da36c5142c1bcc52389e997d2cc69eb79104

See more details on using hashes here.

File details

Details for the file goygram-0.3.6-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goygram-0.3.6-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 581e91e963e5451d7c437f7a5e52ff3bc75ef00f840c1952c0d7e898ef4d2c77
MD5 0f97ee012c45b0d511d5baf8b9aa325b
BLAKE2b-256 e2d58959cbbbf5c0e4cc333c2c6e8c8cf71b7963fb1eda5bd724ce66c0f65620

See more details on using hashes here.

Supported by

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