Skip to main content

A Python package to download images from IIIF manifests

Project description

Download images from IIIF manifests

PyPI - Version PyPI - Python Version Test Status

This repository contains code to download images from IIIF manifests. It takes into account limitations and data specificities from various institutions.

pip install iiif-download

Basic usage

The configuration is stored in iiif_download/config.py and can be overriden by setting environment variables.

Inside a script

from iiif_download import IIIFDownloader, config

# Override the default configuration
config.max_size = 2500
config.img_dir = "custom/path/to/images"

# Use downloader with global config
downloader = IIIFDownloader()

# or override the global config for a specific downloader
downloader = IIIFDownloader(
    img_dir="path/to/dir"  # surcharge config.img_dir
)

manifest = "https://example.org/manifest"

# Download images from a manifest inside img_dir/dir_name
downloader.download_manifest(manifest, save_dir="dir_name")

Command line

# override specific variables
export IIIF_BASE_DIR=custom/path/to/images
export IIIF_MAX_SIZE=4000
# or use .env
source .env

venv/bin/python run.py -f test-manifests.txt

Metadata extraction

from iiif_download import IIIFManifest

manifest = IIIFManifest("https://example.org/manifest")
manifest.load()
lic = manifest.license
author = manifest.get_meta("author")
images = manifest.get_images()

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

iiif_download-0.1.3.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iiif_download-0.1.3-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file iiif_download-0.1.3.tar.gz.

File metadata

  • Download URL: iiif_download-0.1.3.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for iiif_download-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6c4e122aed8be34e7b4a70c9c34e5565dc32de128c3d5869c643730818694847
MD5 ae6c4a76f97a102c684090c78614aa46
BLAKE2b-256 61b04c4dd911086dac9d76aaa1dc3afbb80a1d7cf52a215d93aa08c7fcd31755

See more details on using hashes here.

File details

Details for the file iiif_download-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: iiif_download-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for iiif_download-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 838956a271e84c210ffc6f5aff2eb8aeff7b5516f42deccb7461df2005d6b721
MD5 ef1fc99761de6c4647ba1ab3f8585689
BLAKE2b-256 3f5a47b9905fb01aaba501ada8b7fb1db125441531fd8d8e4552242c4b2f0779

See more details on using hashes here.

Supported by

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