Skip to main content

qri python client

Project description

qri-python

 ██████╗ ██████╗ ██╗
██╔═══██╗██╔══██╗██║
██║   ██║██████╔╝██║
██║▄▄ ██║██╔══██╗██║
╚██████╔╝██║  ██║██║
 ╚══▀▀═╝ ╚═╝  ╚═╝╚═╝

Python client for qri ("query")

Installation

pip install qri

About

Python wrapper to enable usage of qri, the dataset toolchain. Can either use a locally installed qri command-line program to work with your local repository, or can directly get datasets from the Qri Cloud.

Dataset objects returned by this library have the components that exist in the standard qri model. The body is returned as a Pandas DataFrame in order to easily integrate with other data science systems, like Jupyter Notebook.

Usage

The following examples assume you have the latest release of the qri command-line client installed. You can get this from https://github.com/qri-io/qri/releases

import qri
# Pull a dataset from cloud and add it to your repository
$ qri.pull("b5/world_bank_population")

Fetching from registry...

"Added b5/world_bank_population: ..."

# List datasets in your repository
$ qri.list()

[Dataset("b5/world_bank_population")]

# Get that single dataset as a variable
$ d = qri.get("b5/world_bank_population")
# Look at metadata description
$ d.meta.description

( 1 ) United Nations Population Division. World Population Prospects: 2017 Revision...

# Get the dataset body as a pandas DataFrame
$ d.body

. country_name country_code indicator_name ...

0 Afghanistan AFG Population, total ...

...

TODO: Save changes

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

qri-0.1.5.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

qri-0.1.5-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file qri-0.1.5.tar.gz.

File metadata

  • Download URL: qri-0.1.5.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for qri-0.1.5.tar.gz
Algorithm Hash digest
SHA256 62878c66179c1f7b8fe2bfadfdb91f5e638b35d275d06b66dee87defe8bbfbd4
MD5 91071f3be846b6be93522022349cfefd
BLAKE2b-256 5be9be21b3b04f715f73958f9c4abb1580d0f7480739f78c38006120efe0e971

See more details on using hashes here.

File details

Details for the file qri-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: qri-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for qri-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1547497430dd0a473512b069bdab2356c4e092bc393555227b4b897c89f68dc
MD5 b0b619213453e75cd9016feabb67daa8
BLAKE2b-256 ded36c08c3311317092bbfd4d970a39ca03c8496453748a31dd32442e1ec93da

See more details on using hashes here.

Supported by

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