Skip to main content

Python interface for Europeana's APIs

This package is a Python client library for several APIs from Europeana:

With this tool you can access in python the data and metadata from our collections. Learn more about the Europeana Data Model here

Installation

Using pip

pip install pyeuropeana

From source

(.venv) $ git clone https://github.com/europeana/rd-europeana-python-api.git
(.venv) $ cd rd-europeana-python-api
(.venv) $ pip install .

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

Search API

import pyeuropeana.apis as apis
import pyeuropeana.utils as utils

# use this function to search our collections
result = apis.search(
    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 = utils.search2df(result)

Record API

import pyeuropeana.apis as apis

# gets the metadata from an object using its europeana id
data = apis.record('/79/resource_document_museumboerhaave_V35167')

Entity API

import pyeuropeana.apis as apis

# suggests an entity based on a text query
data = apis.entity.suggest(
  text = 'leonardo',
  TYPE = 'agent',
  language = 'es'
)

# retrieves the data from an entity using the identifier
data = apis.entity.retrieve(
  TYPE = 'agent',
  IDENTIFIER = 3
)

# resolves entities from an input URI
data = apis.entity.resolve('http://dbpedia.org/resource/Leonardo_da_Vinci')

IIIF API

import pyeuropeana.apis as apis

# The IIIF API is mostly used to access newspapers collections at Europeana

# returns a minimal set of metadata for an object
data = apis.iiif.manifest('/9200356/BibliographicResource_3000118390149')

# returns text and annotations for a given page of an object
data = apis.iiif.annopage(
  RECORD_ID = '/9200356/BibliographicResource_3000118390149',
  PAGE_ID = 1
)

# returns the transciption of a single page of a newspaper
data = apis.iiif.fulltext(
  RECORD_ID = '/9200396/BibliographicResource_3000118435063',
  FULLTEXT_ID = '8ebb67ccf9f8a1dcc2ea119c60954111'
)

Documentation

The documentation is available at Read the Docs

You can also build the docs

Metadata

Release files for pyeuropeana 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyeuropeana 0.1.7
File Size Uploaded
pyeuropeana-0.1.7.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyeuropeana 0.1.7
File Interpreter ABI Platform
pyeuropeana-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / pyeuropeana-0.1.7.tar.gz

Download URL pyeuropeana-0.1.7.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
73fa11b5b5f095f5605390c4644af8f6450e79f93bc6bd41884cd395bc747548
BLAKE2b-256 checksum
How to use checksums
fa60476aa54b3333d851670472993031101dd5802893448b456e8164cef4b55a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release files / pyeuropeana-0.1.7-py3-none-any.whl

Download URL pyeuropeana-0.1.7-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1a424fe4b8f3cf4f52b33a8ec75264a94580f8a2b90b8ba1d653a2f5b51bbd2
BLAKE2b-256 checksum
How to use checksums
8bf9f55b1ae0d9614ec3074888f997f00e0f731b1dc52c239590cb66edda030e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page