datagovsg
This is an unofficial Python package for interacting with APIs available at Data.gov.sg.
Installing the package
Install the package using pip:
pip install datagovsg
Using the package
The main steps are:
Import a class.
Instantiate an object from the class.
Call a function on that object.
For more information, refer to the documentation.
Usage overview
Interacting with Data.gov.sg’s API is done through one of four clients, where each client corresponds with a “set” of endpoints. (Data.gov.sg 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 Data.gov.sg’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.
Reference
Metadata
Release files for datagovsg 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datagovsg-1.0.2.tar.gz | 23.5 kB | Without provenance | Details for datagovsg-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datagovsg-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for datagovsg-1.0.2-py3-none-any.whl |
Total release size: 56.1 kB
Release files / datagovsg-1.0.2.tar.gz
| Download URL | datagovsg-1.0.2.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7767bd9b9e1985ea172409fef19c3e0ae60d71663c359badcf82249956c41e11
|
|
BLAKE2b-256 checksum How to use checksums |
b52b6a86b46e416f6d1580bed35ba932c7718eb6630b8e05079ed3c5bec10968
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / datagovsg-1.0.2-py3-none-any.whl
| Download URL | datagovsg-1.0.2-py3-none-any.whl |
|---|---|
| Size | 32.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01c57626602ea379d73b0242440076f90a3600e71dbacb132fe28212b5ee696e
|
|
BLAKE2b-256 checksum How to use checksums |
c35093f8101506db34acbc1a076297d21b0993c852c187152f9767577f0bccf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for datagovsg 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.