Skip to main content

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 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.

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

ura-token-pkg-chengguan-0.0.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

ura_token_pkg_chengguan-0.0.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file ura-token-pkg-chengguan-0.0.4.tar.gz.

File metadata

  • Download URL: ura-token-pkg-chengguan-0.0.4.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

Hashes for ura-token-pkg-chengguan-0.0.4.tar.gz
Algorithm Hash digest
SHA256 09b7e95177154802f98c7b59864dbf132d1bcd2085aabd86c43270b428cad62e
MD5 00a530bfbcd3e445cf5a501c6647b91a
BLAKE2b-256 9d1faa128b52d9c87c11ed1736691b133d481cae630135829f9997babe631838

See more details on using hashes here.

File details

Details for the file ura_token_pkg_chengguan-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: ura_token_pkg_chengguan-0.0.4-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

Hashes for ura_token_pkg_chengguan-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5aadf939950776fca7fb5d7c7e11ea26e4a87603192da24207bb92a1a581b7eb
MD5 65f09978fe1080f6f7c34e4a74111147
BLAKE2b-256 8d96394fdfee5293e575013e577962b0bf4daefccf877c3cb29466f609fc4694

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page