วันอาทิตย์ที่ 2 ตุลาคม พ.ศ. 2559

Python Line Notify

1. go to https://notify-bot.line.me/my/ To Create Token with message

 
2. Create Toke, Click Generate Token


3. Enter Message to generate Token and Select group to notify and Click Generate Token
 
4. Click Copy Token key and close
5. Check in select group, please add LINE Notify into group.
6. Create python file and add code
# -*- coding: utf-8 -*-
import requests,json
LINE_ACCESS_TOKEN="Your Token" #token
url = "https://notify-api.line.me/api/notify"
msg = {"message":"Test Message"} #message
LINE_HEADERS = {'Content-Type':'application/x-www-form-urlencoded',"Authorization":"Bearer "+LINE_ACCESS_TOKEN}
session = requests.Session()
resp =session.post(url, headers=LINE_HEADERS, data=msg)
print(resp.text)

Turbogears 2.3 on Heroku

Turbogears 2.3 on Heroku Step 1 : Install waitress pip install waitress Step 2 : Install turbogears app gearbox quickstart myproturb...