Skip to main content

isimip-client

Latest release Python Version License DOI

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

Setup

The library is written in Python (> 3.8) 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. The installation of Python 3 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 package provides a the Python class ISIMIPClient which can be used in scripts or notebooks in the following way:

from isimip_client.client import ISIMIPClient

client = ISIMIPClient()

The methods of this client object can then be used to perform queries to the ISIMIP Repository, e.g. to seach for datasets

# 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(path='ISIMIP3b/InputData/climate/atmosphere/bias-adjusted/global/daily/ssp370/GFDL-ESM4/')

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

The response object is a dictionary of the form

{
    "count": 1001,
    "next": "https://data.isimip.org/api/v1/datasets/?page=2&...",
    "previous": null,
    "results": [
        ...
    ]
}

where each result contains the information for one dataset matching the provided search criteria. By default, only 10 datasets are returned and you can access the next 10 by providing page=2 to the datasets method. You can also use page_size=N to increase the number of returned results per page.

Similar searches can be performed on the files endpoint, e.g.:

response = client.files(...)

The ISIMIP Repository proviedes a "Configure download" feature, which can be used to perform operations on a set of files before downloading them. A common use case it the cut-out of a specific region. Technical details about this Files API can be found here. The client can be used to perform the same operations which are available on the webpage:

response = client.select_bbox(paths, west, east, south, north, poll=poll)

response = client.select_point(paths, lat, lon, poll=poll)

response = client.mask_bbox(paths, west, east, south, north, poll=poll)

response = client.mask_country(paths, country, poll=poll)

response = client.mask_landonly(paths, poll=poll)

response = client.mask_mask(paths, mask, var, poll=poll)

response = client.mask_shape(paths, shapefile, layer, poll=poll)

response = client.mask_shape(paths, geojson, layer, poll=poll)

response = client.cutout_bbox(paths, west, east, south, north, poll=poll)

response = client.cutout_point(paths, lat, lon, poll=poll)

# in order to download the created zip file, download method can be used
client.download(response['file_url'], path='downloads')

In addition, the client allows to use the API with a custom list of operations. In order to first cut out a rectangular area from the CHELSA high resolution data and then cut out a shape from a shapefile, you can use:

# Admin 0 - Countries from https://www.naturalearthdata.com
ne_shape = Path('~/data/isimip/shapes/ne_10m_admin_0_sovereignty.zip')
ne_mask = ne_shape.with_suffix('.nc')

# ISIMIP3a high resolution precipitation input data
paths = [
    'ISIMIP3a/InputData/climate/atmosphere/obsclim/global/daily/historical/CHELSA-W5E5/chelsa-w5e5_obsclim_pr_30arcsec_global_daily_201612.nc',
    ...
]

# chain of operations
operations = [
    {
        'operation': 'cutout_bbox',
        'bbox': [
             5.800,  # west
            10.600,  # east
            45.800,  # south
            47.900   # north
        ]
    },
    {
        'operation': 'create_mask',
        'shape': ne_shape.name,
        'mask': ne_mask.name,
    },
    {
        'operation': 'mask_mask',
        'mask': ne_mask.name,
        'var': 'm_91'  # switzerland layer 91 in the shapefile
    }
]

# list of uploaded files, referenced in the operations list
uploads = [ne_shape]

# sumbit the prepared job to the API and poll every 4 seconds for it's status
response = client.submit_job(paths, operations, uploads, poll=4)

Before 2025, the File API was only available in its first version, which can still be used:

client = ISIMIPClient(files_api_url='https://files.isimip.org/api/v1', files_api_version='v1')

client.select(paths, bbox=[south, north, west, east])
client.select(paths, point=(lat, lon))
client.select(paths, country=country)

client.mask(paths, bbox=[south, north, west, east])
client.mask(paths, country=country)
client.mask(paths, landonly=True)

client.cutout(paths, bbox=[south, north, west, east])

More examples can be found in the notebooks directory.

Command line client

Most features of the client can also be used on the command line using the isimip-client command, e.g.:

isimip-client select_bbox   [PATHS]... --west=-20 --east=20 --south=-10 --north=10

isimip-client select_point  [PATHS]... --lat=6.25 --lon=18.17

isimip-client mask_bbox     [PATHS]... --west=-20 --east=20 --south=-10 --north=10

isimip-client mask_country  [PATHS]... --country=bra

isimip-client mask_landonly [PATHS]...

isimip-client mask_mask     [PATHS]... --mask=~/data/isimip/api/countrymasks.nc --var=m_AUS

isimip-client mask_shape    [PATHS]... --shape=~/data/isimip/shapes/World_Continents.zip --layer=3

isimip-client mask_shape    [PATHS]... --shape=~/data/isimip/shapes/World_Continents.geojson --layer=4

isimip-client cutout_bbox   [PATHS]... --west=-20 --east=20 --south=-10 --north=10

isimip-client cutout_point  [PATHS]... --lat=6.25 --lon=18.17

where [PATHS]... denotes the list of ISIMIP file path to process, seperated by spaces.

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.

Metadata

Release files for isimip-client 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isimip-client 2.0.2
File Size Uploaded Provenance Actions
isimip_client-2.0.2.tar.gz 17.0 kB With provenance Details for isimip_client-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isimip-client 2.0.2
File Interpreter ABI Platform Actions
isimip_client-2.0.2-py3-none-any.whl Python 3 none any Details for isimip_client-2.0.2-py3-none-any.whl

Total release size: 28.0 kB

Release files / isimip_client-2.0.2.tar.gz

Download URL isimip_client-2.0.2.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fb3cb35ef2506a0b8908fd60ab98002b9143457a2d463a0a1b2f4a4bc354b5e3
BLAKE2b-256 checksum
How to use checksums
1f6c3f25874b37d9c71547e50e33f49618574804bffefd421eeecfc8a89fb453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

Release files / isimip_client-2.0.2-py3-none-any.whl

Download URL isimip_client-2.0.2-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bba7c65329af62af04f163256f6cb12a5fb393d7d3c24a816de81b54532ac68b
BLAKE2b-256 checksum
How to use checksums
49d1abc416f88190d6b795dd418fdf3a2cedc48027e41b88f13f333aee2b4b7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

Security for isimip-client 2.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for isimip_client-2.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page