The Wayback Machine - https://web.archive.org/web/20200906143238/https://github.com/python-botogram/botogram/
Skip to content
master
Go to file
Code

Latest commit

* Added support for function annotations

With this commit you are able to experience a very new way to create your own commands. Instead of doing multiple checks & conversions on parameters, you may now use annotations (see PEP 3107) in order to convert automatically them. Example: https://gist.github.com/hearot/e00bd75312a781c4a20db1131585cd38

* Fix build errors

* Fix other build errors

* Add typing as a required package in order to support Python 3.4

* Delete the "parameterized" parameter

`parameterized` was used in order to let the user choose if the function should have used the new method to get parameters. However, the whole PR is backward compatible even without it, so it was useless.

* Update documentation and tests & make parameters_list a property

* Support Python 3.4 and Python 3.5

* Ignore conversion errors

* Add Hearot as a contributor

* Fix lint error

* Fix the ignore function

* Fix the automatic parametrization

* Fix ImportError

* Add `versionchanged` to `command`

* Update `versionchanged`

* Add `versionchanged` to `add_command`

* Add `versionchanged` to "Arguments for the command hook"

* Remove .idea from .gitignore

* Add `typing` to `install_requires`

* Fix PEP 8 E501

* Add a comment in order to explain the flow of `_help_generic_message`

* Fix PEP 8 E501 & E261
ac30be0

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

botogram Build Status News channel

Just focus on your bots.

botogram is a Python framework, which allows you to focus just on creating your Telegram bots, without worrying about the underlying Bots API.

While most of the libraries for Telegram out there just wrap the Bots API, botogram focuses heavily on the development experience, aiming to provide you the best API possible. Most of the Telegram implementation details are managed by botogram, so you can just focus on your bot.

import botogram
bot = botogram.create("YOUR-API-KEY")

@bot.command("hello")
def hello_command(chat, message, args):
    """Say hello to the world!"""
    chat.send("Hello world")

if __name__ == "__main__":
    bot.run()

You can find the documentation at botogram.dev. Also, you can get all the news about botogram in its Telegram channel.

Please note botogram currently doesn't support some of the upstream API features. All of them will be implemented in botogram 1.0

Supported Python versions: 3.4+ License: MIT

Installation

You can install easily botogram with pip (be sure to have Python 3.4 or higher installed):

$ python3 -m pip install botogram2

If you want to install from the source code, you can clone the repository and install it with setuptools. Be sure to have Python 3.4 (or a newer version), pip, virtualenv, setuptools and invoke installed:

$ git clone https://github.com/python-botogram/botogram.git
$ cd botogram
$ invoke install

On some Linux systems you might need to wrap the invoke install command with sudo, if you don't have root privileges.

You can’t perform that action at this time.