Hi,
I have just added some new features for the next release of pandaSDMX
(0.3.0):
Here is an extract from the docs:
What's new?
==============
v0.3.0dev
--------------
* pythonic filters for data requests:
Request.get allows the ``key`` keyword argument in a data request to
be a dict mapping dimension names
to values. In this case, the dataflow definition and datastructure
definition
are downloaded on the fly, cached in memory and used to validate the
keys.
The dotted key string needed to construct the URL will be generated
automatically.
* The Response.write method takes a ``parse_time`` keyword arg. Set it
to False to avoid
parsing of dates, times and time periods as exotic formats may cause
crashes.
* The Request.get method takes a ``memcache`` keyward argument. If set
to a string,
the received Response instance will be stored in the dict
``Request.cache`` for later use. This is useful
when, e.g., a DSD is needed multiple times to validate keys.
* fixed base URL for Eurostat
So now one can express a filtered data request like so:
>>> from pandasdmx import Request
>>> ecb = Request('ECB')
>>> exchange_rates = ecb.get('data', 'EXR', key=dict(CURRENCY='USD+CHF',
FREQ='A'))
This makes filtering data request a lot easier. Though experimental, I
think you can safely use the new features from the development version from
https://github.com/dr-leo/pandaSDMX/tree/v0.3.0
I have tried a couple of data requests from Eurostat. They all ended up
with errors. Perhaps they have server problems this weekend... Or I have
gotten something wrong.
Cheers,
Leo