Skip to content

chengguan/ura_token_package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URA Token Package

This is a small example to obtain URA API token.

Register for your access key with URA

Example:

import requests
import json

from ura_token import ura_token

u=ura_token.ura_token('<place your ura access key here>')

url="https://www.ura.gov.sg/uraDataService/invokeUraDS?service=Car_Park_Availability"
myobj = {'AccessKey': u.get_accesskey(), 'token': u.get_token(), 'User-Agent': 'Mozilla/5.0'}
resp = requests.post(url, headers=myobj)

print(json.dumps(resp.json()['Result'], indent=4))

Questions or bugs, please write to chengguan.teo@gmail.com.

About

This is a small project done to learn how to package python module and host it on pypi.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages