We just released version 2.22 of CODA.
This release contains a big update to the Python interface.
First, we changed Python wrapping of the CODA C library from SWIG to cffi. This makes the CODA Python interface independent from CPython, and it can now also be used with e.g. pypy.
As part of this we also greatly improved the performance of the Python code. With CPython we have seen cases of a 2x performance improvement, and with pypy even 4x speedups.
Second, the CODA Python interface now contains a full OO interface, with classes for e.g. Product, Cursor, and Type. And opening products can now be done using a
with statement like:
import coda with coda.Product('somefile.nc') as product: # directly read some data using fetch data = product.fetch('/dataset/field') # use cursors cursor = product.cursor() cursor.goto('/dataset/field') data = cursor.fetch()
Note that the old python interface still works as well, so any python code you already have will still work with this new CODA version.