A small example to obtain URA API token.
Project description
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 token 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ura-token-pkg-chengguan-0.0.3.tar.gz.
File metadata
- Download URL: ura-token-pkg-chengguan-0.0.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c94d02593bb14ceee7acc44743baa80feb859cfea3699b3cd9febd7706be34d
|
|
| MD5 |
f42e2ab1542932074f75081ed0ffe7d0
|
|
| BLAKE2b-256 |
f363d97f3d54c6a335868815021d4ec015d4f4a201240bf69d0c17d3983554f3
|
File details
Details for the file ura_token_pkg_chengguan-0.0.3-py3-none-any.whl.
File metadata
- Download URL: ura_token_pkg_chengguan-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f344d88a39f02c95dc8202ac8e8b3aea7b2a447b391e2d6d5ceb33b740be4a8
|
|
| MD5 |
44472df8f8dcbecc6133312ba65792db
|
|
| BLAKE2b-256 |
0b60692d1806f8fbc3c1ec2e78cd1de1d28dc02bcbd93c89e19c47a22af0dfe7
|