Python framework for Gap Service API
Project description
### Install Package
```
pip3 install gappy
```
compatible python version: 3.4+
### How to use
#### Run with flask
Example:
```
import gappy
from flask import Flask
from flask import request
TOKEN = '<your token>'
bot = gappy.Bot(TOKEN)
app = Flask(__name__)
@app.route('/', methods=['POST'])
def parse_request():
msg = request.form
content_type = msg['type']
chat_id = msg['chat_id']
data = msg['data']
bot.send_text(chat_id, data)
return 'OK'
if __name__ == '__main__':
app.run()
```
```
pip3 install gappy
```
compatible python version: 3.4+
### How to use
#### Run with flask
Example:
```
import gappy
from flask import Flask
from flask import request
TOKEN = '<your token>'
bot = gappy.Bot(TOKEN)
app = Flask(__name__)
@app.route('/', methods=['POST'])
def parse_request():
msg = request.form
content_type = msg['type']
chat_id = msg['chat_id']
data = msg['data']
bot.send_text(chat_id, data)
return 'OK'
if __name__ == '__main__':
app.run()
```
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
gappy-0.4.3.tar.gz
(6.4 kB
view hashes)