Skip to main content

Synopsis

This library provides a simple python interface to the heliophysics data and services of NASA's Coordinated Data Analysis System (CDAS). This library implements the client side of the CDAS RESTful web services and can return data from any of these datasets in a SpacePy datamodel, xarray.Dataset, or pandas.DataFrame with all source and ISTP/SPDF metadata. Note that this package is included in the HelioCloud base image, so there is no need to install it there. Frequently asked questions concerning this library are at FAQ. For more general details about the CDAS web services, see https://berniegsfc.github.io/cdasws/.


Badge for the repository entry r3d100010168 in re3data

Code Example

This package contains example code calling most of the available web services. To run the included example, do the following

python -m cdasws

Also, the following Jupyter notebooks demonstrate different features of the library:

  1. Data Retrieval (ipynb file) demonstrating use of library with results returned in SpacePy data model, xarray.Dataset, and pandas.DataFrame. Launch on Binder.
  2. CDAWeb Binning Example (ipynb file) demonstrating use CDAWeb binning. Launch on Binder.
  3. Magnetic Field Line Conjunction Example (ipynb file) with related data retrieval/plotting using cdasws. Launch on Binder.

And at the bottom of each CDAWeb dataset description is a "Data Access Code Examples" link that contains dataset-specific code utilizing this package to access the data.

Motivation

This library hides the HTTP, JSON/XML, and CDF details of the CDAS web services. A python developer only has to deal with python objects and methods (primarily the SpacePy data model or xarray.Dataset object with full ISTP/SPDF metadata).

Dependencies

The only required dependencies are the following:

  1. httpx2
  2. python-dateutil.

If you call the get_data method then one of the following two sets of additional dependencies are required:

  1. To have get_data return the data in the SpacePy data model.
    • SpacePy. Refer to the SpacePy documentation for the details of SpacePy's dependencies.
  2. To have get_data return the data in an xarray.Dataset or pandas.DataFrame.

If you want to take advantage of HTTP caching, then install the following:

  1. hishel.

Installation

As noted in the dependencies above, if you intend to call the get_data method, you must install one of the following options.

  1. SpacePy.

     $ pip install -U spacepy
    
  2. cdflib and xarray.

     $ pip install -U cdflib
     $ pip install -U xarray
    

Then, to install this package

$ pip install -U cdasws

or to include the optional cache package

$ pip install -U cdasws[cache]

API Reference

Refer to cdasws package API reference

or use the standard python help mechanism.

from cdasws.cdasws import CdasWs
help(CdasWs)

Tests

The tests directory contains unittest tests.

See also description llms.txt

Contributors

Bernie Harris.
e-mail for support.

License

This code is licensed under the NASA Open Source Agreement (NOSA).

Metadata

Release files for cdasws 1.8.19

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

Source distribution (sdist)

Source distribution for cdasws 1.8.19
File Size Uploaded Provenance Actions
cdasws-1.8.19.tar.gz 44.7 kB Without provenance Details for cdasws-1.8.19.tar.gz

Built distribution (wheel)

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

Total release size: 96.1 kB

Release files / cdasws-1.8.19.tar.gz

Download URL cdasws-1.8.19.tar.gz
Size 44.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5ff9fd4ada3a9932be732c3daa62eaa121e2165646c7dcb9bafcc71b9421aecc
BLAKE2b-256 checksum
How to use checksums
c92576b20035858d71ee7d80287af23b1d48675c25800ebe4a2d34cf5f8f54db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / cdasws-1.8.19-py3-none-any.whl

Download URL cdasws-1.8.19-py3-none-any.whl
Size 51.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce73cae666627e839aa0cce924dc18247fb6e15e25737de4b9e064a7ec93dcf4
BLAKE2b-256 checksum
How to use checksums
4e99231c6cbaddc3144890466a2f73d3d683bf1fc6cbe11ff86ed3f4fb9d53f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for cdasws 1.8.19

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.8.19 This release

2 release files No provenance

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