Python Telegram bot api.
Project description
dgram
A simple, but extensible Python implementation for the Telegram Bot API.
Both synchronous and asynchronous.
Supported Bot API version: 6.3!
Official documentation
Contents
- Getting started
- Writing your first bot
- General API Documentation
- Advanced use of the API
- API conformance limitations
- Asyncdgram
- F.A.Q.
- The Telegram Chat Group
- Telegram Channel
- More examples
- Code Template
- Bots using this library
Getting started
This API is tested with Python 3.7-3.11 and Pypy 3. There are two ways to install the library:
- Installation using pip (a Python package manager):
$ pip install dgram
- Installation from source (requires git):
$ git clone https://github.com/DEV-Degram/dgram.git
$ cd dgram
$ python setup.py install
or:
$ pip install git+https://github.com/eternnoir/dgram.git
- Started Code:
import dgram
bot = dgram.dgram("YOUR_TOKEN_HERE")
@bot.message_handler(commands=['start'])
def send_welcome(message):
bot.reply_to(message, "Welcome, dear!")
bot.polling()
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
Dgram-1.0.0.tar.gz
(179.0 kB
view hashes)