Pydap 2.2
Roberto De Almeida
roberto at dealmeida.net
Wed Oct 11 14:12:19 PDT 2006
Hi, all.
I'm proud to announce the release of pydap 2.2, a Python
implementation of the Data Access Protocol. Pydap 2.2.0 was released
earlier this weekend, but I was holding the announcement until the new
website with all the documentation was ready. You can find information
about the latest version (already 2.2.1) and all the documentation at:
http://pydap.org
(Same address, new content and layout.)
There were a few improvements to the client: it now has support for
authentication (Digest, Basic and WSSE) and smart caching. The
handling of Sequences is much more "pythonic" now, behaving like any
other Python iterable; my pet feature is that now it's possible to
filter Sequences using only Python code, eg:
>>> dataset = dap.client.open('http://example.com/dataset')
>>> seq = dataset['location']
>>> maxlat = 83
>>> filtered_seq = [v for v in seq if v['latitude'] > maxlat+1]
>>> for v in filtered_seq: do_something()
This will build the correct constraint expression
('location.latitude>84') to filter the data on the server-side. The
older method (still available) required the user to know the variables
ids and the syntax of CEs, since it was necessary to build the CE by
hand. The new method does this all automagically (by inspecting the
frame and extracting/parsing the source code!).
The server is easier to install and deploy. I've added plenty of
documentation describing how to run it with Apache, Cherokee, lighttpd
and IIS using different interfaces (CGI, FastCGI and SCGI). It's also
faster, and now it's possible to customize a template to alter the
HTML code generated for the directory listing.
The server is also more modular: there are plugins not only for data
formats (netCDF, Matlab, SQL) but also for *responses*. This means you
can install a JSON response plugin, eg, and your server will return a
JSON representation of the dataset when visiting a dataset with the
'.json' extension. (JSON responses are great for AJAX applications,
since they can be easily parsed from Javascript.)
I am currently working at CPTEC/INPE (part of the Brazilian space
agency) to make their data available through DAP servers. I would like
to thank them for giving me financial support and time to improve
pydap while keeping it free and open.
Roberto
More information about the Opendap-tech
mailing list