Skip to main content

A thin client library to use the API of the ISIMIP repository using Python.

Project description

isimip-client

Latest release PyPI release Python Version License

A thin client library to use the API of the ISIMIP repository using Python.

Setup

The library is written in Python (> 3.6) uses only dependencies, which can be installed without administrator priviledges. The installation of Python (and its developing packages), however differs from operating system to operating system. Optional Git is needed if the application is installed directly from GitHub. The installation of Python 3 and Git for different plattforms is documented here.

The library can be installed via pip. Usually you want to create a virtual environment first, but this is optional:

# setup venv on Linux/macOS/Windows WSL
python3 -m venv env
source env/bin/activate

# setup venv on Windows cmd
python -m venv env
call env\Scripts\activate.bat

The library can conveniently installed using pip:

pip install isimip-client

Usage

The library is used in the following way:

from isimip_client.client import ISIMIPClient
client = ISIMIPClient()

# search the ISIMIP repository using a search string
response = client.datasets(query='gfdl-esm4 ssp370 pr')

# search the ISIMIP repository for a specific subtree
response = client.datasets(tree='ISIMIP3b/InputData/climate/atmosphere/global/daily/ssp370/gfdl-esm4/r1i1p1f1/w5e5/pr')

# search the ISIMIP repository using specifiers
response = client.datasets(simulation_round='ISIMIP3b',
                           product='InputData',
                           climate_forcing='gfdl-esm4',
                           climate_scenario='ssp370',
                           climate_variable='pr')

In order to use the dev version of the repository use:

client = ISIMIPClient(data_url='https://dev.isimip.org/api/v1', auth=(USER, PASS))

More examples can be found in the notebooks directory.

Jupyter notebooks

I you want to run the included jupyter notebooks, you can install the additional packages using:

pip install isimip-client[jupyter]

Then Jupyter lab can be started using:

jupyter lab

The example notebooks are in the notebooks directory.

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

isimip-client-1.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

isimip_client-1.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file isimip-client-1.0.1.tar.gz.

File metadata

  • Download URL: isimip-client-1.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for isimip-client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 30ef6a8caf5e38d29388bfc58c5ef6245e82df339f289db06969efc4cadd679f
MD5 e25cadd66a26da16bdb56c28d85a8dde
BLAKE2b-256 64d569aac2868574a7566ec3db5e490be13bb6e6d2221573cec848a3557aa2ce

See more details on using hashes here.

File details

Details for the file isimip_client-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for isimip_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e5f988eda7fbb8d16cb001546347d818365ebcf75e5b88ef5e4cd0ca42168fd
MD5 1893298284fb8c56b3524d47c651c43e
BLAKE2b-256 c6986427f80d8c6f2d89add43dfaa25735c2bf6aa44712b5fe327510d3873b6e

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