cdasws

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

Copyright © 2018-2026 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.
 1#!/usr/bin/env python3
 2
 3#
 4# NOSA HEADER START
 5#
 6# The contents of this file are subject to the terms of the NASA Open
 7# Source Agreement (NOSA), Version 1.3 only (the "Agreement").  You may
 8# not use this file except in compliance with the Agreement.
 9#
10# You can obtain a copy of the agreement at
11#   docs/NASA_Open_Source_Agreement_1.3.txt
12# or
13#   https://cdaweb.gsfc.nasa.gov/WebServices/NASA_Open_Source_Agreement_1.3.txt.
14#
15# See the Agreement for the specific language governing permissions
16# and limitations under the Agreement.
17#
18# When distributing Covered Code, include this NOSA HEADER in each
19# file and include the Agreement file at
20# docs/NASA_Open_Source_Agreement_1.3.txt.  If applicable, add the
21# following below this NOSA HEADER, with the fields enclosed by
22# brackets "[]" replaced with your own identifying information:
23# Portions Copyright [yyyy] [name of copyright owner]
24#
25# NOSA HEADER END
26#
27# Copyright (c) 2018-2026 United States Government as represented by
28# the National Aeronautics and Space Administration. No copyright is
29# claimed in the United States under Title 17, U.S.Code. All Other
30# Rights Reserved.
31#
32
33
34"""
35Package for accessing the Coordinate Data Analysis System (CDAS)
36web services <https://cdaweb.gsfc.nasa.gov/WebServices/REST/>.<br>
37
38Copyright &copy; 2018-2026 United States Government as represented by the
39National Aeronautics and Space Administration. No copyright is claimed in
40the United States under Title 17, U.S.Code. All Other Rights Reserved.
41
42Notes
43-----
44<ul>
45  <li>Due to rate limiting implemented by the CDAS web services, an
46      attempt to make simultaneous requests from many threads is likely
47      to actually reduce performance.  At this time, it is best to make
48      calls from five or fewer threads.</li>
49  <li>Since CDAS data has datetime values with a UTC timezone, all
50      client provided datetime values should have a timezone of UTC.
51      If a given value's timezone is not UTC, the value is adjusted to
52      UTC.  If a given value has no timezone (is naive), a UTC timezone
53      is set.</li>
54</ul>
55"""
56
57
58__version__ = "1.8.17"
59
60
61#
62# Limit on the number of times an HTTP request which returns a
63# 429 or 503 status with a Retry-After header will be retried.
64#
65RETRY_LIMIT = 100
66
67#
68# XML schema namespace
69#
70NS = 'http://cdaweb.gsfc.nasa.gov/schema'
71#
72# XHTML schema namespace
73#
74XHTML_NS = 'http://www.w3.org/1999/xhtml'
75#
76# All namespaces found in responses.
77#
78NAMESPACES = {
79    'cdas': NS,
80    'xhtml': XHTML_NS
81}
82#
83# For backward compatibility with cdasws versions < 1.8.12.
84#
85from cdasws.cdasws import *  # pylint: disable=wrong-import-position
RETRY_LIMIT = 100
NS = {'cdas': 'http://cdaweb.gsfc.nasa.gov/schema', 'xhtml': 'http://www.w3.org/1999/xhtml'}
XHTML_NS = 'http://www.w3.org/1999/xhtml'
NAMESPACES = {'cdas': 'http://cdaweb.gsfc.nasa.gov/schema', 'xhtml': 'http://www.w3.org/1999/xhtml'}