griiist
IIIF-to-dataset tooling for ML/RAG. Millions of openly licensed, richly described images sit behind IIIF endpoints in the world's galleries, libraries, archives, and museums — and there is no polite, resumable, rate-limited harvester that crawls whole collections, resolves rights, downloads at a chosen resolution, and emits ML-ready datasets with metadata intact. Existing IIIF downloaders are single-manifest CLI tools. griiist connects the cultural-heritage world to the ML world in a way neither community has built.
The idea in one line
Point griiist at an IIIF Collection; get back a HuggingFace dataset / WebDataset shards / embedding-ready parquet of only the images you're licensed to use, with their metadata and provenance intact.
How it's structured: catalog, then materialize
The central design choice is to separate the cheap metadata crawl from the expensive image download. At millions-of-images scale these are different operations and must not be conflated.
- Catalog — a metadata-only crawl. Walk IIIF Collections → Manifests → Canvases and build a queryable local index of everything available: image identifiers,
info.jsoncapabilities, resolved rights, and flattened metadata. No image bytes. Fast, polite, laptop-sized even for large collections. - Materialize — take a filter over the catalog and produce a dataset: download images at the chosen resolution, package into the target format with metadata and provenance intact.
Crawl an institution once, then produce many filtered datasets — "only CC0 paintings > 2000px", "a 10k random sample for a prototype" — without re-hitting their servers. The rights filter is inspectable before anything is downloaded, and the expensive half is trivially resumable because its work-list is a static, checkpointed table.
Pipeline
Four decoupled, individually checkpointed stages:
discover → filter/select → fetch → package
(catalog) ────────────────┘ └──── (materialize) ────┘
Decoupling fetch from discover is what lets a harvest be interrupted and resumed without re-crawling or re-downloading.
Materialize writes its output as numbered shards inside the --out directory and records each image's progress in the catalog. Rerun the same command to resume an interrupted run; images that failed are recorded rather than aborting the run, and --retry-failed retries them.
What "correct" means here
These are load-bearing requirements, not nice-to-haves:
- Level-0 aware. IIIF Image API compliance varies. Many institutional servers are level 0 and serve only pre-generated sizes listed in
info.json, not arbitrary!w,h. griiist readsinfo.jsonand negotiates to the closest available size rather than assuming it can request anything. - Conservative rights allowlist. RightsStatements.org includes "In Copyright" statements; richly described ≠ openly licensed. griiist normalizes CC and RightsStatements.org URIs (and the Presentation 2.x
license/attributionvs 3.0rights/requiredStatementsplit) and, by default, emits only affirmatively-open items. Unresolvable rights → excluded, not included. - Lossless metadata. IIIF
metadatais heterogeneous, localized, free-form. Every record carries both a normalized subset (image_id, manifest_uri, canvas_id, label, dimensions, rights, attribution, provider) and the raw manifest JSON. - Provenance as output. Every record carries its source URI, the exact size parameters requested, harvest timestamp, and tool version — so a dataset is reproducible and its licensing is auditable.
- Polite and resumable. Per-host rate limiting with backoff and
Retry-Afterhandling; a conservative global default with per-institution overrides. Any harvest is interruptible and resumes without lost or duplicated work.
Built on iiisight
griiist is a Python application built on iiisight, the tolerant, async IIIF read client. iiisight handles the IIIF side — collection/manifest/canvas traversal, Presentation v2→v3 normalization, and info.json-aware Image API requests — so griiist can focus on what makes it a harvester: rights filtering, polite resumable crawling at scale, cataloging, and dataset packaging. The split is deliberate: iiisight is the reusable read substrate; griiist is one application built on it.
Outputs
- HuggingFace
datasets— parquet-backed, ready toload_dataset/ push to the Hub. - WebDataset — tar shards for large-scale streaming training.
- Parquet — clean, well-schematized, ready for a downstream embedding pipeline.
Non-goals
Not a IIIF viewer. Not a general web scraper — it uses the structured IIIF APIs only. Not an embedding/inference engine ("embedding-ready" means the parquet is clean and schematized, not that griiist runs models). No image editing beyond resolution selection.
Name
"griiist" ≈ grist — grain brought to the mill for grinding; grist for the mill is raw material to be processed. The tool turns IIIF collections into grist for the training mill. The extra is echo IIIF.
Metadata
Release files for griiist 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| griiist-0.1.tar.gz | 50.5 kB | Without provenance | Details for griiist-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| griiist-0.1-py3-none-any.whl | Python 3 | none | any | Details for griiist-0.1-py3-none-any.whl |
Total release size: 80.1 kB
Release files / griiist-0.1.tar.gz
| Download URL | griiist-0.1.tar.gz |
|---|---|
| Size | 50.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81e6be5964b1ffc8fb2d663fcfe9fdd9940744e32c03cb7fb06cc60a9246475d
|
|
BLAKE2b-256 checksum How to use checksums |
769df535f16c8e64bfc976552ba15fef799ae223680c08ccd6d1d9e3919a957b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / griiist-0.1-py3-none-any.whl
| Download URL | griiist-0.1-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87b1ae1d09c980530efea3a143285093cd11d3d58d5e1a72b9cf58cb6d73a906
|
|
BLAKE2b-256 checksum How to use checksums |
83538acd5e83dec2d1f7ef70401832f63e9666664ba5a14a6d792ad18ec1b3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for griiist 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.