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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for telegrambotapiwrapper-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20dcd810a2610aee7b7c5bdee2b0e17d733ce7e2b75ee74a92b0e40144045e2 |
|
MD5 | c2ad4f3efb694293a39029548d75d433 |
|
BLAKE2b-256 | ee49df386272e72a756c1a5659859e13fc1c5bbe1b13999eeb93afcf3b6fc436 |
Close
Hashes for telegrambotapiwrapper-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeabdce78ff774c3f01299fccd3d17db9e0ddd67bb71cbbbe52a0c37025659e9 |
|
MD5 | 48e10b6389e972634cd6d31bee4b0095 |
|
BLAKE2b-256 | 1803090c1dc2fdf304cb9b69621b128f2414ee0e7ac986980c0afa6d05905434 |