Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pyrubrum
An intuitive framework for creating Telegram bots.
Create your own bot in less than 100 lines!

Channel: @pyrubrum • Developer: @hearot • License: GPLv3

Pyrubrum

from pyrogram import Client
from pyrubrum import Handler, Menu, transform

bot = Client(...)

handler = Handler(transform(
    {
        Menu("Start", "start", "Hello!", default=True): [
            Menu("About me", "about_me", "I'm just a bot!"),
            Menu("Thoughts", "thoughts",
                 "I'm a bot, I cannot think properly..."),
        ]
    }
))

handler.setup(bot)
bot.run()

Pyrubrum (/ˈpaɪɹˈuːbɹəm/) is a versatile, charming framework for creating Telegram bots, jointly with Pyrogram.

Features

  • Automatic deep-link generation with DeepLinkMenu
  • Built-in support for Redis
  • Complete documentation
  • Custom styles for inline keyboards
  • Database integration
  • Fast & optimized using MTProto jointly with Pyrogram
  • Fully encrypted parameters
  • Intuitive creation of inline keyboards
  • LRU caching with functools.lru_cache
  • Native support for the "Go back" button
  • No limit for callback_data (see Telegram Bot API)
  • Paging integration with PageMenu

Examples

In order to make use of the proposed examples, you need to create your own environment file by renaming sample.env into .env and editing all the necessary variables.

  • Café - Get an overview of the design which lies inside Pyrubrum while interacting with multiple commands and pages.
  • Calendar - Get what day of the week a day is by simply choosing a year, a month and a day while discovering the potential of Pyrubrum page menus.
  • Hitchhiker - Come to know how media are handled with Pyrubrum and...get an existential question answered.
  • Sample - Interact with inline menus while understanding how Pyrubrum works.

Changelog

See CHANGELOG.md. Find new features in FEATURES.md.

Commit messages

See Conventional Commits.

Contributing

See CONTRIBUTING.md.

Versioning

See PEP 440.

Thanks

  • veggero/tytg for giving me the idea of developing a simple framework with which you can code a folder-like bot.
  • IlhomBahoraliev/pyromenu for letting me understand that an object-oriented library would make the difference in developing this project.

Branding

See hearot/pyrubrum-assets.

Copyright & License

Metadata

Release files for Pyrubrum 0.1a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Pyrubrum 0.1a3
File Size Uploaded Provenance
Pyrubrum-0.1a3.tar.gz 52.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Pyrubrum 0.1a3
File Interpreter ABI Platform
Pyrubrum-0.1a3-py3-none-any.whl Python 3 none any Details

Total release size: 120.0 kB

Release files / Pyrubrum-0.1a3.tar.gz

Download URL Pyrubrum-0.1a3.tar.gz
Size 52.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b5694be24e793cc63a0fc873a19b67d87d33b1bb0f690fac6613e8d201f02226
BLAKE2b-256 checksum
How to use checksums
7dfc24bcaecf1eb5de377c69a86be93653b4eb14171fd7bc8fd9e174aeb6e356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

Release files / Pyrubrum-0.1a3-py3-none-any.whl

Download URL Pyrubrum-0.1a3-py3-none-any.whl
Size 67.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38bf688453014132b4cd7a8fae537a0addea2155fa5d2d4f01a2a41245196ea4
BLAKE2b-256 checksum
How to use checksums
f8a1e203d451f140347d1b46a8865a49ba279fa5e945605fa66e74474bf1b824
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

Security for Pyrubrum 0.1a3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page