Skip to main content

A Python wrapper around Europeana APIs

Project description

Python interface for Europeana's APIs

This package is a Python wrapper for Europeana's Search and Record APIs.

Installation

As this package is not published on PyPI currently, the only way to install it is through its Git repository host using pip:

pip install https://github.com/europeana/rd-europeana-python-api/archive/stable.zip

From source

git clone https://github.com/europeana/rd-europeana-python-api.git

cd rd-europeana-python-api

pip install -e .

Authentication

Get your API key here

Set EUROPEANA_API_KEY as an environment variable running export EUROPEANA_API_KEY=yourapikey in the terminal.

If running in Google Colab use os.environ['EUROPEANA_API_KEY'] = 'yourapikey'

Usage

from pyeuropeana.apis import SearchWrapper
from pyeuropeana.utils.edm_utils import res2df

result = SearchWrapper(
  query = '*',
  qf = '(skos_concept:"http://data.europeana.eu/concept/base/48" AND TYPE:IMAGE)',
  reusability = 'open AND permission',
  media = True,
  thumbnail = True,
  landingpage = True,
  colourpalette = '#0000FF',
  theme = 'photography',
  sort = 'europeana_id',
  profile = 'rich',
  rows = 1000,
) # this gives you full response metadata along with cultural heritage object metadata

# use this utility function to transform a subset of the cultural heritage object metadata
# into a readable Pandas DataFrame
dataframe = res2df(result, full=False)

Colab tutorial

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

pyeuropeana-0.1.2.tar.gz (13.5 kB view hashes)

Uploaded Source

Built Distribution

pyeuropeana-0.1.2-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

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