Giter VIP home page Giter VIP logo

pyrubrum's Introduction

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

pyrubrum's People

Contributors

hearot avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.