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 details)
File details
Details for the file gappy-0.4.3.tar.gz
.
File metadata
- Download URL: gappy-0.4.3.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e97fa5d4055b9a7a0398c7d97a55ed0cc6c6913b3b778f6a2f626d77c7e0884 |
|
MD5 | 320be04863b35382ed0d251e0ca75f82 |
|
BLAKE2b-256 | 9def3974fb4333c4f88ddc7a085190dfbd7f63560fa208354128cb6b5e334248 |