Flask-Telebot-1.0.0
توضیحات
Telebot on flask
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Flask-Telebot-1.0.0 |
| نام | Flask-Telebot |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Gatlab |
| ایمیل نویسنده | Gatlab <dev@gatlab.co> |
| آدرس صفحه اصلی | https://github.com/GatLab/Flask-Telebot.git |
| آدرس اینترنتی | https://pypi.org/project/Flask-Telebot/ |
| مجوز | Copyright 2022 Gatlab <dev@gatlab.co> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
# Flask-Telebot
A simple way to demo Flask apps from your machine.
Makes your [Flask](http://flask.pocoo.org/) apps running on localhost available
over the internet via the excellent [ngrok](https://ngrok.com/) tool.
## Compatability
Python 3.6+ is required.
## Installation
```bash
pip install Flask-Telebot
```
### Inside Jupyter / Colab Notebooks
Notebooks have [an issue](https://stackoverflow.com/questions/51180917/python-flask-unsupportedoperation-not-writable) with newer versions of Flask, so force an older version if working in these environments.
```bash
!pip install flask==0.12.2
```
See the [example notebook](https://colab.research.google.com/github/GatLab/Flask-Telebot/blob/master/examples/example.ipynb) for a working example.
## Quickstart
1. Import with ```from flask_telebot import FlaskTelebot```
```python
# example.py
from flask import Flask
from flask_telebot import FlaskTelebot
app = Flask(__name__)
tele=FlaskTelebot(token='TELEGRAM_BOT_TOKEN')
tele.init_app(app)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == '__main__':
app.run()
```
Running the example:
```bash
python example.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Running on http://<random-address>.ngrok.io
```
نیازمندی
| مقدار | نام |
|---|---|
| - | Flask |
| - | pyngrok |
| - | pyTelegramBotAPI |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl Flask-Telebot-1.0.0:
pip install Flask-Telebot-1.0.0.whl
نصب پکیج tar.gz Flask-Telebot-1.0.0:
pip install Flask-Telebot-1.0.0.tar.gz