An async API wrapper for Telegram bot API in Python
Project description
telegram.py
An async API wrapper for Telegram bot API in Python
Installation
Python 3.7+ is required to install and use telegram.py.
Install the latest release from PyPI:
# Mac/Linux
python3 -m pip install telegram.py
# Windows
py -3 -m pip install telegram.py
Or install the development version from GitHub:
# Mac/Linux
python3 -m pip install git+https://github.com/ilovetocode2019/telegram.py
# Windows
py -3 -m pip install git+https://github.com/ilovetocode2019/telegram.py
Quick Example
import logging
import telegrampy
from telegrampy.ext import commands
logging.basicConfig(level=logging.INFO, format="(%(asctime)s) %(levelname)s %(message)s", datefmt="%m/%d/%y - %H:%M:%S %Z")
logger = logging.getLogger("telegrampy")
bot = commands.Bot("token here")
@bot.command()
async def hi(ctx):
await ctx.send("Hello")
bot.run()
For a line-by-line walkthrough for this example, see the quickstart.
Documentation
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
telegram.py-0.3.1.tar.gz
(19.6 kB
view hashes)
Built Distribution
Close
Hashes for telegram.py-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5337d575a05c5afaee7d01e3c4d6efa0693d18ed2472f6b443039501d46266f6 |
|
MD5 | d8123c6963bd06ab2620d14489563f45 |
|
BLAKE2b-256 | f0003d8abde14fe3d07100a2ad215f37dac9131bbd78c7220fa8dac95ac91657 |