Skip to content

New image source europeana - #808

Open
andreapasquali97 wants to merge 15 commits into
varietywalls:masterfrom
andreapasquali97:new-image-source-europeana
Open

New image source europeana#808
andreapasquali97 wants to merge 15 commits into
varietywalls:masterfrom
andreapasquali97:new-image-source-europeana

Conversation

@andreapasquali97

Copy link
Copy Markdown

Add Europeana as new image source

Description

This PR adds Europeana API integration as a new image source.

Features

  • Fetches high-quality artwork images from Europeana's collections
  • Supports filtering by a given keyword
  • Proper metadata retrieving/displaying (Artwork link, artist and artist link when available)
  • Configurable through Variety's preferences UI

API Compliance

This implementation follows Variety's contribution guidelines:

  • Uses Europeana's official API
  • Only images that are open access and use licensed (API filtering)

Testing

  • New Europeana tests created
  • New Tests ran and passed
  • UI behavior tested on my machine
Screenshot from 2025-11-28 20-11-04

Notes

  • I used a project API key that I requested from Europeana specifically for the Variety project use.

@jlu5
jlu5 requested a review from peterlevi December 25, 2025 21:31
Comment thread variety/plugins/builtin/downloaders/EuropeanaDownloader.py Outdated
Comment thread variety/plugins/builtin/downloaders/EuropeanaConfigurableSource.py Outdated
Comment thread tests/TestEuropeanaDownloader.py Outdated
Comment thread variety/plugins/builtin/downloaders/EuropeanaDownloader.py Outdated
Comment thread variety/plugins/builtin/downloaders/EuropeanaDownloader.py Outdated


class EuropeanaConfigurableSource(ConfigurableImageSource):
class EuropeanaConfigurableDownloader(EuropeanaDownloader):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a top level class (I'm not sure why it's laid out this way in the Unsplash downloader)

return super(DefaultDownloader, self).get_folder_name()

def get_europeana_api_url(self):
return super().get_europeana_api_url()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function shouldn't be needed as all it does is call its parent

return _("Fetch artwork images from Europeana.eu for a given keyword")

def get_source_name(self):
return "Europeana"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return "Europeana"
return "europeana"

seems we always use lowercase for sources by convention


logger = logging.getLogger("variety")

random.seed()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be needed, random is automatically seeded by default


DESCRIPTION = _("Europe's digital cultural heritage from Europeana.eu")

# This API key has been requested from Andrea Pasquali to Europeana.ue in order to use it for Variety project

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# This API key has been requested from Andrea Pasquali to Europeana.ue in order to use it for Variety project
# This API key has been requested from Andrea Pasquali to Europeana.eu in order to use it for Variety project

return self.config

def get_folder_name(self):
return super(DefaultDownloader, self).get_folder_name()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function override isn't needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants