Skip to main content

Python client for the Open Data Euskadi REST API.

Project description

irekia

travis-badge coveralls-badge pypi-badge license-badge

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 pipenv:

$ pipenv 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:

$ pipenv install --dev && pipenv shell
$ tox

Project details


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.2.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

irekia-0.1.2-py2-none-any.whl (9.7 kB view details)

Uploaded Python 2

File details

Details for the file irekia-0.1.2.tar.gz.

File metadata

  • Download URL: irekia-0.1.2.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for irekia-0.1.2.tar.gz
Algorithm Hash digest
SHA256 452bcd407b9f939dca7bed63f1c4a4fcec1cd1652a71332ae7860f90bf772c82
MD5 ab006b127717208c91d0e44f672f58f1
BLAKE2b-256 5bb89906ddae2c51b247f7c19245184532a0aaaab9ffb965c7a6db630ac12405

See more details on using hashes here.

File details

Details for the file irekia-0.1.2-py2-none-any.whl.

File metadata

File hashes

Hashes for irekia-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 47c091b8ec9c105266f19dc5b08c45d6d539f09a78155039bf47cf5c9407fdf5
MD5 c5a7e6f726e9a5ea02b35e4e9365af33
BLAKE2b-256 085090dad0c3f1d86e08d4fcb6321b3ff48385d5c2831a3453798dfe5576c50a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page