USA flag An official website of the United States governmentv

Package cdasws

Package for accessing the Coordinate Data Analysis System (CDAS) web services https://cdaweb.gsfc.nasa.gov/WebServices/REST/.

Copyright © 2018-2025 United States Government as represented by the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.

Notes

  • Due to rate limiting implemented by the CDAS web services, an attempt to make simultaneous requests from many threads is likely to actually reduce performance. At this time, it is best to make calls from five or fewer threads.
  • Since CDAS data has datetime values with a UTC timezone, all client provided datetime values should have a timezone of UTC. If a given value's timezone is not UTC, the value is adjusted to UTC. If a given value has no timezone (is naive), a UTC timezone is set.
Expand source code
#!/usr/bin/env python3

#
# NOSA HEADER START
#
# The contents of this file are subject to the terms of the NASA Open
# Source Agreement (NOSA), Version 1.3 only (the "Agreement").  You may
# not use this file except in compliance with the Agreement.
#
# You can obtain a copy of the agreement at
#   docs/NASA_Open_Source_Agreement_1.3.txt
# or
#   https://cdaweb.gsfc.nasa.gov/WebServices/NASA_Open_Source_Agreement_1.3.txt.
#
# See the Agreement for the specific language governing permissions
# and limitations under the Agreement.
#
# When distributing Covered Code, include this NOSA HEADER in each
# file and include the Agreement file at
# docs/NASA_Open_Source_Agreement_1.3.txt.  If applicable, add the
# following below this NOSA HEADER, with the fields enclosed by
# brackets "[]" replaced with your own identifying information:
# Portions Copyright [yyyy] [name of copyright owner]
#
# NOSA HEADER END
#
# Copyright (c) 2018-2025 United States Government as represented by
# the National Aeronautics and Space Administration. No copyright is
# claimed in the United States under Title 17, U.S.Code. All Other
# Rights Reserved.
#


"""
Package for accessing the Coordinate Data Analysis System (CDAS)
web services <https://cdaweb.gsfc.nasa.gov/WebServices/REST/>.<br>

Copyright &copy; 2018-2025 United States Government as represented by the
National Aeronautics and Space Administration. No copyright is claimed in
the United States under Title 17, U.S.Code. All Other Rights Reserved.

Notes
-----
<ul>
  <li>Due to rate limiting implemented by the CDAS web services, an
      attempt to make simultaneous requests from many threads is likely
      to actually reduce performance.  At this time, it is best to make
      calls from five or fewer threads.</li>
  <li>Since CDAS data has datetime values with a UTC timezone, all
      client provided datetime values should have a timezone of UTC.
      If a given value's timezone is not UTC, the value is adjusted to
      UTC.  If a given value has no timezone (is naive), a UTC timezone
      is set.</li>
</ul>
"""


__version__ = "1.8.12"


#
# Limit on the number of times an HTTP request which returns a
# 429 or 503 status with a Retry-After header will be retried.
#
RETRY_LIMIT = 100

#
# XML schema namespace
#
NS = 'http://cdaweb.gsfc.nasa.gov/schema'
#
# XHTML schema namespace
#
XHTML_NS = 'http://www.w3.org/1999/xhtml'
#
# All namespaces found in responses.
#
NAMESPACES = {
    'cdas': NS,
    'xhtml': XHTML_NS
}
#
# for backward compatibility
#
from cdasws.cdasws import *

Sub-modules

cdasws.cdasws

Module for accessing the Coordinate Data Analysis System (CDAS) web services https://cdaweb.gsfc.nasa.gov/WebServices/REST/.

cdasws.datarepresentation

Module defining data representations for the data returned from the cdasws.get_data function.

cdasws.datarequest

Package defining classes to represent the DataRequestEntity and its sub-classes from https://cdaweb.gsfc.nasa.gov/WebServices/REST/CDAS.xsd.

cdasws.timeinterval

Package defining a class to represent the TimeInterval class from https://cdaweb.gsfc.nasa.gov/WebServices/REST/CDAS.xsd.