1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

add short description to example and readme files

This commit is contained in:
vixfwis 2020-12-17 15:34:36 +03:00
parent 75a18e5869
commit 4e61bc3a8b
2 changed files with 17 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Webhook examples using pyTelegramBotAPI
There are 4 examples in this directory using different libraries:
There are 5 examples in this directory using different libraries:
* **Python (CPython):** *webhook_cpython_echo_bot.py*
* **Pros:**
@ -42,4 +42,13 @@ There are 4 examples in this directory using different libraries:
* **Cons:**
* Requires Python 3.4.2+, don't work with Python 2
*Latest update of this document: 2017-01-30*
* **Twisted (20.3.0):** *webhook_twisted_echo_bot.py*
* **Pros:**
* Asynchronous event-driven networking engine
* Very high performance
* Built-in support for many internet protocols
* **Cons:**
* Twisted is low-level, which may be good or bad depending on use case
* Considerable learning curve - reading docs is a must.
*Latest update of this document: 2020-12-17*

6
examples/webhook_examples/webhook_twisted_echo_bot.py Executable file → Normal file
View File

@ -1,6 +1,12 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This is an example echo bot using webhook with Twisted network framework.
# Updates are received with Twisted web server and processed in reactor thread pool.
# Relevant docs:
# https://twistedmatrix.com/documents/current/core/howto/reactor-basics.html
# https://twistedmatrix.com/documents/current/web/howto/using-twistedweb.html
import logging
import telebot
import json