Python client for the Open Data Euskadi REST API.
Project description
This package allows you to communicate with the Open Data Euskadi REST API. Use the irekia Client to generate the convoluted Open Data Euskadi query strings and get the data you want.
Installation
Install it using pip:
$ pip install irekia
Usage examples
Import the Client:
from irekia import Client
Results for multiple families, or multiple content_types inside a family (more information about the available families and content types can be found here):
Client(['eventos', 'opendata']).get()
Client('opendata', ['opendata']).get()
Full text search:
Client().search('OpenData').get()
Codified queries:
Client('eventos', 'evento').filter(['eventStartDate.GTE.TODAY', 'eventTown.EQ.079']).get()
Client().filter('contentName.EQ.20150929125668').get()
Choose language for results:
Client('eventos', 'evento').filter(['eventStartDate.GTE.TODAY', 'eventTown.EQ.079']).get(lang='eu')
Changing results’ limit (default is 100) and pagination:
Client('eventos', 'evento').limit(20).get(page=5)
Ordering of results:
Client('opendata').order_by('-documentCreateDate').get()
Use the client only to build a URL:
Client('eventos', 'evento').order_by('eventStartDate').limit(20).get(page=2, url_only=True)
For developers
To run tests:
$ python setup.py test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
irekia-0.1.0.tar.gz
(9.2 kB
view hashes)