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 details)
Built Distribution
File details
Details for the file telegram.py-0.3.1.tar.gz
.
File metadata
- Download URL: telegram.py-0.3.1.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ef34c13bfaa80cf77c9ed6fc24b7fe732928436081de32c79beff849eae5e4 |
|
MD5 | ec6714df0e5cdd1fc013136e5669e189 |
|
BLAKE2b-256 | d3ef476dac820a0fcf983a8b381f97c29be287138adf126607cfa8e1ec27da94 |
File details
Details for the file telegram.py-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: telegram.py-0.3.1-py3-none-any.whl
- Upload date:
- Size: 36.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5337d575a05c5afaee7d01e3c4d6efa0693d18ed2472f6b443039501d46266f6 |
|
MD5 | d8123c6963bd06ab2620d14489563f45 |
|
BLAKE2b-256 | f0003d8abde14fe3d07100a2ad215f37dac9131bbd78c7220fa8dac95ac91657 |