Skip to main content

Python Telegram Bot Api Wrapper.

Project description

IN DEVELOPING

telegrambotapiwrapper

Python Telegram Bot API wrapper

Why telegrambotapiwrapper?

telegramapiwrapper is the simplest Telegram Bot Api wrapper for Python among existing wrappers.

Requirements

Python 3.7

Installation

stub

Getting token

Writing first bot

# firstbot.py
from telegrambotapiwrapper.wrapper import Api
from telegrambotapiwrapper.api.types import User

TOKEN = "<past_your_bot_api_token>"

bot_api = Api(token=TOKEN)
me = bot_api.get_me()
print("me: {}".format(me))
print("isinstance(me, User): {}".format(isinstance(me, User)))  # see type of result

Result:

(venv) dzmitry@mycomp:~$ python3 firstbot.py 
me: User(id=123456789, is_bot=True, first_name='myrfffrbot', last_name=None, username='myrfffrbot', language_code=None)
isinstance(me, User): True
(venv) dzmitry@mycomp:~$

Examples

Setting webhook

Sending message

Sending file

Using proxies

License

MIT License Copyright (c) 2019 Dzmitry Maliuzhenets

See LICENSE for details.

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

telegrambotapiwrapper-0.0.2.tar.gz (39.4 kB view hashes)

Uploaded Source

Built Distribution

telegrambotapiwrapper-0.0.2-py3-none-any.whl (50.5 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