Skip to main content

pydap

CI Python PyPI PyPI - Downloads conda-forge conda-forge Downloads black license pre-commit.ci status DOI

What is pydap?

pydap is an open-source implementation of the OPeNDAP protocol, written from scratch in pure Python. You can use pydap to access scientific data available on the many OPeNDAP servers publicly-available through the internet. Because pydap supports remote and lazy evaluation, you can access the data without having to download it; Instead, you work with special array and iterable objects that download data on-the-fly as necessary, saving bandwidth and time. The module also comes with a robust-but-lightweight OPeNDAP server, implemented as a WSGI application.

Why pydap?

Originally developed in the 2000s, pydap is one of the oldest open-source Python projects available and is routinely developed and maintained by the OPeNDAP community at large. In addition, pydap is a long-recognized backend engine (and dependency) for xarray and chances are you have used pydap in the past without knowing it.

Quickstart

pydap is a lightweight python package that you can use in either of the two modalities: a client and as a server. You can install the latest version using pip. After installing pip you can install pydap with this command:

    $ pip install pydap

This will install pydap together with all the required dependencies.

pydap is also available through Anaconda. Below we install pydap and its required dependencies, along with common additional packages in a fresh conda environment named "pydap":

    $ conda create -n pydap -c conda-forge python=3.12 pydap numpy jupyterlab ipython netCDF4 scipy matplotlib

Now you simply activate the pydap environment:

    $ conda activate pydap

You can now use pydap as a client and open any remotely served dataset, and pydap will download the accessed data on-the-fly as needed. For example consider this dataset currently hosted on OPeNDAP's Hyrax data server

    from pydap.client import open_url
    pyds = open_url('http://test.opendap.org:8080/opendap/catalog/ghrsst/20210102090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.nc', protocol='dap4')
    pyds.tree()
    .20210102090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.nc
    ├──time
    ├──lat
    ├──lon
    ├──analysed_sst
    ├──analysis_error
    ├──mask
    ├──sea_ice_fraction
    ├──dt_1km_data
    └──sst_anomaly
    pyds['sst_anomaly'].shape
    (1, 17999, 36000)

pydap also comes with a simple server, implemented as a WSGI application. To use it, you first need to install the server and optionally a data handler:

Running pydap as a Server

    $ pip install "pydap[server,netcdf]"

This will install the necessary dependencies for running pydap as a server, along with extra dependencies for handling netCDF4 dataset. Now create a directory for your server data.

To run the server just issue the command:

    $ pydap --data ./myserver/data/ --port 8001 --workers 4 --threads 4

This will start a standalone server running on the default http://localhost:8001/, serving netCDF files from ./myserver/data/ Since the server uses the WSGI standard, pydap uses by default one (1) worker and one (1) thread, but these can be defined by the user like in the case above (four (4) workers and four (4) threads). pydap can also easily be run behind Apache.

The server documentation has more information on how to better deploy pydap.

Documentation

For more information, see the pydap documentation.

Help and Community

If you need any help with pydap, open an issue in this repository. You can also email the mailing list.

Metadata

Release files for pydap 3.5.11

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

Source distribution (sdist)

Source distribution for pydap 3.5.11
File Size Uploaded Provenance
pydap-3.5.11.tar.gz 28.9 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pydap 3.5.11
File Interpreter ABI Platform
pydap-3.5.11-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 MB

Release files / pydap-3.5.11.tar.gz

Download URL pydap-3.5.11.tar.gz
Size 28.9 MB
Tags Source
SHA-256 checksum
How to use checksums
ec4929d6b91618a34534fc872ab3879042b934c511fc4c6181efea9114b9521a
BLAKE2b-256 checksum
How to use checksums
8bd3fc1a2be414ed17c7824bbabe9581aabf97685e2128a4fc45ce2c1100567a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pydap-3.5.11-py3-none-any.whl

Download URL pydap-3.5.11-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
17047c35989f84c1cb137771c5cf75348f220f5f7f49ecb04736a67b2b1daf26
BLAKE2b-256 checksum
How to use checksums
3bcac3bb0c130964b68cf763622e7592f33935e568124b56506f134af52c5ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for pydap 3.5.11

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.

Release history Release notifications | RSS feed

This release

3.5.11 This release

2 release files No provenance

2.9.9.dev1

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