[![PyPi Package Version](https://img.shields.io/pypi/v/dgram.svg)](https://pypi.python.org/pypi/dgram)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/dgram.svg)](https://pypi.python.org/pypi/dgram)
[![Documentation Status](https://readthedocs.org/projects/pytba/badge/?version=latest)](https://pytba.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/eternnoir/dgram.svg?branch=master)](https://travis-ci.org/eternnoir/dgram)
[![PyPi downloads](https://img.shields.io/pypi/dm/dgram.svg)](https://pypi.org/project/dgram/)
[![PyPi status](https://img.shields.io/pypi/status/dgram.svg?style=flat-square)](https://pypi.python.org/pypi/dgram)
# <p align="center">dgram
<p align="center">A simple, but extensible Python implementation for the <a href="https://core.telegram.org/bots/api">Telegram Bot API</a>.</p>
<p align="center">Both synchronous and asynchronous.</p>
## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#november-5-2022">6.3</a>!
<h2><a href='https://pytba.readthedocs.io/en/latest/index.html'>Official documentation</a></h2>
## Contents
* [Getting started](#getting-started)
* [Writing your first bot](#writing-your-first-bot)
* [Prerequisites](#prerequisites)
* [A simple echo bot](#a-simple-echo-bot)
* [General API Documentation](#general-api-documentation)
* [Types](#types)
* [Methods](#methods)
* [General use of the API](#general-use-of-the-api)
* [Message handlers](#message-handlers)
* [Edited Message handler](#edited-message-handler)
* [Channel Post handler](#channel-post-handler)
* [Edited Channel Post handler](#edited-channel-post-handler)
* [Callback Query handlers](#callback-query-handler)
* [Shipping Query Handler](#shipping-query-handler)
* [Pre Checkout Query Handler](#pre-checkout-query-handler)
* [Poll Handler](#poll-handler)
* [Poll Answer Handler](#poll-answer-handler)
* [My Chat Member Handler](#my-chat-member-handler)
* [Chat Member Handler](#chat-member-handler)
* [Chat Join request handler](#chat-join-request-handler)
* [Inline Mode](#inline-mode)
* [Inline handler](#inline-handler)
* [Chosen Inline handler](#chosen-inline-handler)
* [Answer Inline Query](#answer-inline-query)
* [Additional API features](#additional-api-features)
* [Middleware handlers](#middleware-handlers)
* [Custom filters](#custom-filters)
* [dgram](#dgram)
* [Reply markup](#reply-markup)
* [Advanced use of the API](#advanced-use-of-the-api)
* [Using local Bot API Server](#using-local-bot-api-sever)
* [Asynchronous dgram](#asynchronous-dgram)
* [Sending large text messages](#sending-large-text-messages)
* [Controlling the amount of Threads used by dgram](#controlling-the-amount-of-threads-used-by-dgram)
* [The listener mechanism](#the-listener-mechanism)
* [Using web hooks](#using-web-hooks)
* [Logging](#logging)
* [Proxy](#proxy)
* [Testing](#testing)
* [API conformance limitations](#api-conformance-limitations)
* [Asyncdgram](#asyncdgram)
* [F.A.Q.](#faq)
* [How can I distinguish a User and a GroupChat in message.chat?](#how-can-i-distinguish-a-user-and-a-groupchat-in-messagechat)
* [How can I handle reocurring ConnectionResetErrors?](#how-can-i-handle-reocurring-connectionreseterrors)
* [The Telegram Chat Group](#the-telegram-chat-group)
* [Telegram Channel](#telegram-channel)
* [More examples](#more-examples)
* [Code Template](#code-template)
* [Bots using this library](#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()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/DEV-Degram/Dgram",
"name": "Dgram",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "telegram bot api tools",
"author": "- Team Zero",
"author_email": "degram27@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ef/29/1427757315d4fd521fd0342b412eb6f44723bce9ae4ebcb665f3b2575c01/Dgram-1.0.0.tar.gz",
"platform": null,
"description": "\r\n[![PyPi Package Version](https://img.shields.io/pypi/v/dgram.svg)](https://pypi.python.org/pypi/dgram)\r\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/dgram.svg)](https://pypi.python.org/pypi/dgram)\r\n[![Documentation Status](https://readthedocs.org/projects/pytba/badge/?version=latest)](https://pytba.readthedocs.io/en/latest/?badge=latest)\r\n[![Build Status](https://travis-ci.org/eternnoir/dgram.svg?branch=master)](https://travis-ci.org/eternnoir/dgram)\r\n[![PyPi downloads](https://img.shields.io/pypi/dm/dgram.svg)](https://pypi.org/project/dgram/)\r\n[![PyPi status](https://img.shields.io/pypi/status/dgram.svg?style=flat-square)](https://pypi.python.org/pypi/dgram)\r\n\r\n# <p align=\"center\">dgram\r\n\r\n<p align=\"center\">A simple, but extensible Python implementation for the <a href=\"https://core.telegram.org/bots/api\">Telegram Bot API</a>.</p>\r\n<p align=\"center\">Both synchronous and asynchronous.</p>\r\n\r\n## <p align=\"center\">Supported Bot API version: <a href=\"https://core.telegram.org/bots/api#november-5-2022\">6.3</a>!\r\n\r\n<h2><a href='https://pytba.readthedocs.io/en/latest/index.html'>Official documentation</a></h2>\r\n\t\r\n## Contents\r\n\r\n * [Getting started](#getting-started)\r\n * [Writing your first bot](#writing-your-first-bot)\r\n * [Prerequisites](#prerequisites)\r\n * [A simple echo bot](#a-simple-echo-bot)\r\n * [General API Documentation](#general-api-documentation)\r\n * [Types](#types)\r\n * [Methods](#methods)\r\n * [General use of the API](#general-use-of-the-api)\r\n * [Message handlers](#message-handlers)\r\n * [Edited Message handler](#edited-message-handler)\r\n * [Channel Post handler](#channel-post-handler)\r\n * [Edited Channel Post handler](#edited-channel-post-handler)\r\n * [Callback Query handlers](#callback-query-handler)\r\n * [Shipping Query Handler](#shipping-query-handler)\r\n * [Pre Checkout Query Handler](#pre-checkout-query-handler)\r\n * [Poll Handler](#poll-handler)\r\n * [Poll Answer Handler](#poll-answer-handler)\r\n * [My Chat Member Handler](#my-chat-member-handler)\r\n * [Chat Member Handler](#chat-member-handler)\r\n * [Chat Join request handler](#chat-join-request-handler)\r\n * [Inline Mode](#inline-mode)\r\n * [Inline handler](#inline-handler)\r\n * [Chosen Inline handler](#chosen-inline-handler)\r\n * [Answer Inline Query](#answer-inline-query)\r\n * [Additional API features](#additional-api-features)\r\n * [Middleware handlers](#middleware-handlers)\r\n * [Custom filters](#custom-filters)\r\n * [dgram](#dgram)\r\n * [Reply markup](#reply-markup)\r\n * [Advanced use of the API](#advanced-use-of-the-api)\r\n * [Using local Bot API Server](#using-local-bot-api-sever)\r\n * [Asynchronous dgram](#asynchronous-dgram)\r\n * [Sending large text messages](#sending-large-text-messages)\r\n * [Controlling the amount of Threads used by dgram](#controlling-the-amount-of-threads-used-by-dgram)\r\n * [The listener mechanism](#the-listener-mechanism)\r\n * [Using web hooks](#using-web-hooks)\r\n * [Logging](#logging)\r\n * [Proxy](#proxy)\r\n * [Testing](#testing)\r\n * [API conformance limitations](#api-conformance-limitations)\r\n * [Asyncdgram](#asyncdgram)\r\n * [F.A.Q.](#faq)\r\n * [How can I distinguish a User and a GroupChat in message.chat?](#how-can-i-distinguish-a-user-and-a-groupchat-in-messagechat)\r\n * [How can I handle reocurring ConnectionResetErrors?](#how-can-i-handle-reocurring-connectionreseterrors)\r\n * [The Telegram Chat Group](#the-telegram-chat-group)\r\n * [Telegram Channel](#telegram-channel)\r\n * [More examples](#more-examples)\r\n * [Code Template](#code-template)\r\n * [Bots using this library](#bots-using-this-library)\r\n\r\n## Getting started\r\n\r\nThis API is tested with Python 3.7-3.11 and Pypy 3.\r\nThere are two ways to install the library:\r\n\r\n* Installation using pip (a Python package manager):\r\n\r\n```\r\n$ pip install dgram\r\n```\r\n* Installation from source (requires git):\r\n\r\n```\r\n$ git clone https://github.com/DEV-Degram/dgram.git\r\n$ cd dgram\r\n$ python setup.py install\r\n```\r\nor:\r\n```\r\n$ pip install git+https://github.com/eternnoir/dgram.git\r\n```\r\n* Started Code:\r\n```\r\nimport dgram\r\n\r\nbot = dgram.dgram(\"YOUR_TOKEN_HERE\")\r\n\r\n@bot.message_handler(commands=['start'])\r\ndef send_welcome(message):\r\n bot.reply_to(message, \"Welcome, dear!\")\r\n\r\nbot.polling()\r\n```\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "GPL2",
"summary": "Python Telegram bot api.",
"version": "1.0.0",
"split_keywords": [
"telegram",
"bot",
"api",
"tools"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "b04e7cce261bf95d17d17e617776ae7b",
"sha256": "ba9724626f0ddc263e527ba23de02c4356038bfdc46c2db5d1c6df6947f33aea"
},
"downloads": -1,
"filename": "Dgram-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "b04e7cce261bf95d17d17e617776ae7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 179044,
"upload_time": "2022-12-23T17:22:24",
"upload_time_iso_8601": "2022-12-23T17:22:24.558477Z",
"url": "https://files.pythonhosted.org/packages/ef/29/1427757315d4fd521fd0342b412eb6f44723bce9ae4ebcb665f3b2575c01/Dgram-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-23 17:22:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "DEV-Degram",
"github_project": "Dgram",
"lcname": "dgram"
}