Record Search Query: ServiceParameters>DATA MANAGEMENT/DATA HANDLING>DATA NETWORKING/DATA TRANSFER TOOLS
Python implementation of the Data Access Protocol (pyDAP)
Entry ID: pyDAP
Abstract: Python implementation of the Data Access Protocol
This module is an implementation of the Data Access Protocol written in Python
from scratch. You can use the module as a client to connect to remote datasets
and download data transparently as needed; you can also run a server to share
your scientific data over the network, so it can be easily accessed using
Matlab, Ferret, GrADS or a web browser.
The module comes with a DAP client, allowing Python programs to access any
DAP-served dataset through array-like objects and lists. It also comes with a
DAP server that understands data in a variety of formats and that can be easily
extended. A lot of effort went into this new release, and there are plenty of
* The server is implemented as a Python Web Server Gateway Interface (WSGI)
_application_ (http://www.python.org/peps/pep-0333.html). A WSGI application
can run on any WSGI _server_. Currently, there are WSGI servers for mod_python,
FastCGI, AJP, SCGI, CGI, Twisted, IIS, so it is possible to run the pyDAP
server unmodified on any of these different environments.
WSGI _middleware_ can also be used between the server and application; pyDAP
implements WSGI middleware for logging events, memory and disk caching and for
automatically generating a THREDDS catalog file. Additional WSGI middleware of
interest include Gzip compression and error handling, available in third-party
ISO Topic Category
Access Constraints The server has support for Python Paste (http://pythonpaste.org), so all the
WSGI configuration mentioned above (server, middleware, etc.) can be handled
using a single INI-like configuration file. pyDAP also comes with a simple
script to run a standalone server for testing purposes:
dap-server.py [-p port] [-d pidfile] [-l logfile] ... [-v debug-level]
* The pyDAP server is able to serve data stored as netCDF, Matlab or Comma
Separated Values (CVS) files. It is also able to serve data stored in RDBMS
using the Python DB-API 2.0 specification; this includes PostgreSQL, MySQL,
Oracle, IBM DB2, Informix, Interbase, Ingres/OpenIngres, JDBC, mxODBC, SQLite
and SAP DB.
The module defines an API that allows new data formats to be supported through
plugins. Plugins can be easily created, and are located by the server through
an automatic discovery mechanism. urrently working on plugins for Grib 1/2
and HDF 4/5 files, and an aggregation plugin. There also a "meta" plugin that
enables any supported file to be served in compressed (gzip/bzip2) format.
* The server is able to handle datasets of arbitrary size. The whole process of
reading the data, encoding to ASCII/XDR and sending through HTTP is done in
small blocks, avoiding memory consumption. Also, the server is able to handle
dynamic datasets generated from Python code.
(http://json.org) response and parser.
eval()ed. Another great advantage of JSON is that it's *also* valid Python code
(!), so it can be easily parsed and generated.
The module already has support for a DDX response/parser, to be implemented
when the final specification is released.
Concerning recent discussions about the DAS, the DAS parser in the module
understands both nested and flat attributes. The DAS response generated by the
server follows the DAP 2 specification and mimics the DDS structure.
* pyDAP is distributed/packaged using setuptools instead of the default
distutils module. Provided you have Python installed, it is possible to install
pyDAP with three simple steps:
sudo python ez_setup.py
sudo easy_install dap
And optionally, for a standalone DAP server:
sudo easy_install dap[server]
This will also install the required dependencies. You'll still need to install
Numeric, Numarray or Scipy Core manually, and a few additional modules
dependending on the data being served. Updating to new versions is also easy
sudo easy_install -U dap
Use Constraints The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, ... merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Creation and Review Dates