Skip to main content

Python package for interacting with APIs available at

Project description

Python 3 PyPi PyPi status GNU General Public License v3.0 Documentation Status

This is an unofficial Python package for interacting with APIs available at

Installing the package

Install the package using pip:

pip install datagovsg

Using the package

The main steps are:

  1. Import a class.
  2. Instantiate an object from the class.
  3. Call a function on that object.

For more information, refer to the documentation.

Usage overview

Interacting with’s API is done through one of four clients, where each client corresponds with a “set” of endpoints. ( doesn’t categorise its endpoints by set, but it can be assumed from the endpoints’ path directories.)

The four clients are: Ckan, Environment, Technology and Transport.

Each client contains several public functions, one function per endpoint. A function’s name is the same as its corresponding endpoint’s ending path.

Most functions accept named arguments, where an argument corresponds with a parameter that the endpoint accepts.

Why have separate clients instead of one single client?

Without knowing how’s API will evolve, and noticing that the endpoints were themselves already partitioned into “sets”, it seemed like a good idea to keep each set of endpoints in its own contextual client. This allows for each “set” of endpoints to be customised on their own, e.g. the Environment endpoints allow for either a date or date-time to be specified, whereas the Transport endpoints don’t.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for datagovsg, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size datagovsg-1.0.3-py3-none-any.whl (32.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size datagovsg-1.0.3.tar.gz (23.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page