Skip to main content

An intuitive framework for creating Telegram bots

Project description

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

License: GPLv3 Developer: @hearot

Pyrubrum

from pyrogram import Client
from pyrubrum import transform_dict, TreeHandler, TreeMenu

bot = Client(...)

handler = TreeHandler(transform_dict(
    {
        TreeMenu("Main", "main", "Hello!"): {
            TreeMenu("About me", "about_me", "I'm just a bot!"),
            TreeMenu("Thoughts", "thoughts",
                     "I'm a bot, I cannot think properly...")
        }
    }
))

handler.setup(bot)
bot.run()

Pyrubrum is a versatile, charming framework for creating Telegram bots, jointly with Pyrogram.

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.

  • 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.
  • Sample - Interact with inline menus while understanding how Pyrubrum works.

Copyright & 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

Pyrubrum-0.1a0.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

Pyrubrum-0.1a0-py3-none-any.whl (35.7 kB view hashes)

Uploaded Python 3

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