Skip to main content

Interact with the ONS API in Python

Project description

PyONS

** Python wrapper for the Office for National Statistics API **

Get List of Datasets

As Pandas DataFrame

from pyONS import api.Datasets

datasets_df = Datasets().as_DataFrame()

As JSON

from pyONS import api.Datasets

datasets_json = Datasets().as_Json()

Get Latest Dataset Version

from pyONS import api.Datasets

dataset = Datasets().Dataset(dataset_id).getLatest()

Interacting with Datasets

List Editions

List Versions

List Dimensions

from pyONS import api.Datasets

dimensions = x = Datasets().Dataset(dataset_id).edition(edition).version(version).dimensions().list()
print(dimensions)

Not affiliated with the Office for National Statistics

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

pyONS-0.0.7a0.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyONS-0.0.7a0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file pyONS-0.0.7a0.tar.gz.

File metadata

  • Download URL: pyONS-0.0.7a0.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for pyONS-0.0.7a0.tar.gz
Algorithm Hash digest
SHA256 c2133309c81389a9915479f92fbda08c86d28acac13c3e259614a673463fe229
MD5 21088f100d8892eb96bba2baaa1defa0
BLAKE2b-256 6fca8773fe727047dd88ea5da3393ab6daac36b832690d0ea718d7a3392ab7e7

See more details on using hashes here.

File details

Details for the file pyONS-0.0.7a0-py3-none-any.whl.

File metadata

  • Download URL: pyONS-0.0.7a0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for pyONS-0.0.7a0-py3-none-any.whl
Algorithm Hash digest
SHA256 59c5872c5de5fb1d90b01ed469a5b28df6f25861073f1362b77e7d012a4b2a06
MD5 4cb4358a29c67870a0146c5503d30035
BLAKE2b-256 d63929872f2bafddb21e7fde8b3833ebd1cd7529a5535ea744ebe6a8266f99c0

See more details on using hashes here.

Supported by

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