RDF Fingerprinter
See the structure of an RDF dataset at a glance. RDF Fingerprinter profiles a SPARQL endpoint and reconstructs the data shapes its data actually follow — its application profile — as an HTML report, SHACL, ShEx, PlantUML diagrams and compact schemas for language models.
An application profile is the set of data shapes that constrain how data are instantiated for a purpose, and so can validate them. Fingerprinting infers that profile from the data: for each class in the dataset, it reconstructs the shape its instances share. Compare two fingerprints to spot how two datasets differ in structure.
Who it's for: data stewards, modellers and reviewers who need to know what a dataset really contains; language models that write SPARQL; and validators, pipelines and CI jobs that check data against its profile.
Documentation: https://meaningfy-ws.github.io/rdf-fingerprinter/ · The story behind 3.5: A fingerprint you can trust on a large graph
Features
- Profiles any SPARQL 1.1 endpoint, read-only, class by class with bounded queries, and says how precise every number is (exact, or first N of M when a class is too big).
- Writes an HTML report and a saved
profile.json, from which SHACL shapes, enriched ShExC, PlantUML diagrams and a pattern schema for language models are generated without querying again. - Scans for modelling pitfalls (
--pitfalls, 28 SPARQL checks, most from the OOPS! catalogue) and fails a CI job on them (--fail-on). - Recognises reifications (
rdf:Statement, singleton properties,owl:Axiom, PROV, Wikibase, RDF 1.2 triple terms, …) and shows the relations they stand for.
How it compares with SHACL Play, sheXer, void-generator, QSE and others: Comparison.
Why you can trust the results
RDF Fingerprinter began in 2024 as report templates and about sixty lines of Python. On large graphs its queries timed out, and the run still reported success. It has since been rewritten around one idea: a fingerprint you can trust on a large graph.
- It never writes to your store. It sends only
SELECTandASKqueries. - Every number says how precise it is: exact, or the first N of M instances when a class is too big. A failed measurement is recorded, not hidden: a run neither stops at the first timeout nor hides it.
- The facts are collected once; the judgements can be redone. Raw counts are saved in
profile.json, and every output is regenerated from it offline, with different thresholds or filters, without touching the endpoint again. - Generated SHACL is graded by confidence:
sh:Violation,sh:Warningorsh:Info, according to how strongly the data support each constraint. - Exit codes tell automation what happened: 0 all measured, 1 written with failures, 2–5 usage
error, endpoint unreachable, unexpected error, or pitfalls at the
--fail-onlevel.
It is built and tested like the infrastructure it is meant to be: 1,300+ unit tests, 191 end-to-end tests against a real triple store, property-based tests, mutation testing after every release (score 0.969 at 3.5), layer boundaries enforced by import-linter, and 12 recorded architecture decisions.
Installation
pip install rdf-fingerprinter
Requires Python 3.12 or later (tested on 3.12, 3.13 and 3.14).
Upgrading from 0.3 or 1.x? The library was rewritten in 2.0 and has grown since. Read the breaking changes per release in the CHANGELOG and the Getting Started upgrade notes.
Quick start
Point fingerprint at a SPARQL endpoint and an output folder (output folders must exist):
mkdir -p out shapes diagrams
fingerprint -e https://my.sparql.endpoint/query -o out
It writes out/main.html (the report) and out/profile.json (the raw profile). Generate other
representations from the saved profile, without querying the endpoint again:
fingerprint-gen-shacl out/profile.json -o shapes/
fingerprint-gen-puml out/profile.json -o diagrams/
Run fingerprint --help for every option (depth, precision, graphs, timeouts, pitfalls, …), and
see Getting Started
for exit codes and configuration files. To use the library from Python, see the
API Reference.
Schemas for LLMs
To give a language model the shape of your data before it writes SPARQL, render the saved profile as
a pattern schema: five files per graph (prefixes-*.md, patterns-*.md, patterns-*.csv,
glossary-*.md, glossary-*.csv) with compact (:Class)-property-> (:Target) lines, statistics,
and labels, alt labels, definitions and notes. Or as enriched ShExC (the same content as ShEx
shapes):
fingerprint-gen-pattern out/profile.json -o llm/ --ontology vocab.ttl --max-classes 30
fingerprint-gen-shex out/profile.json -o llm/ --min-instances 10
Give a model that writes SPARQL patterns-*.md and prefixes-*.md; filter the CSV files with grep
or DuckDB. On the test data, the patterns Markdown of a graph is about five times smaller than its
SHACL shapes (2,081 against 10,950 characters).
See Schemas for LLMs.
Namespace filters
Leave out whole namespaces in every output (report, SHACL, ShExC, PlantUML, pattern schema) by
prefix, prefix glob or IRI stem; repeat the option to combine them, and use --include-namespace to
bring one back:
fingerprint-gen-pattern profile.json -o llm/ --exclude-namespace relationid --exclude-namespace 'prv*'
fingerprint-gen-doc profile.json -o out/ --exclude-namespace 'https://my.brainframe.com/#/knowledge/'
The report keeps every namespace in its table, marks the excluded ones, and has a switch per namespace that hides its classes and property rows on the page. See Namespace filters.
Development
Requires Poetry, Docker and (for make check-spec) Node.js.
make install # Poetry env with the test and lint groups
make check-all # lint, types, layers, OpenSpec, parallel tests with coverage floors — the gate CI runs
make check-release # check-all + release tests + random properties + e2e; before a release
make oxigraph-load-test-data # in-memory Oxigraph on :7878 with the test graphs
make test-e2e # end-to-end tests against it (local only)
See Development.
Contributing
Contributions are welcome. Before you change something, please discuss it with the maintainers in a GitHub issue. We follow the Apache code of conduct; please follow it in all your interactions on the project.
License
Licensed under the Apache License 2.0. Maintained by Meaningfy.
Metadata
Release files for rdf-fingerprinter 3.8.0
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 |
|---|---|---|---|---|
| rdf_fingerprinter-3.8.0.tar.gz | 171.0 kB | With provenance | Details for rdf_fingerprinter-3.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rdf_fingerprinter-3.8.0-py3-none-any.whl | Python 3 | none | any | Details for rdf_fingerprinter-3.8.0-py3-none-any.whl |
Total release size: 397.7 kB
Release files / rdf_fingerprinter-3.8.0.tar.gz
| Download URL | rdf_fingerprinter-3.8.0.tar.gz |
|---|---|
| Size | 171.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c0177c68d348380d95ff3939e4c386ea130eb18bd546a50d08f102306f7cd5a
|
|
BLAKE2b-256 checksum How to use checksums |
612262d82a7525b0ed7612589ad94a98682c16a95bd727ae08c555fd85cc90cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / rdf_fingerprinter-3.8.0-py3-none-any.whl
| Download URL | rdf_fingerprinter-3.8.0-py3-none-any.whl |
|---|---|
| Size | 226.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c58573fa6d0d2485db248eec440ef9023974d37542ac2191ff31cbda07dd6f2b
|
|
BLAKE2b-256 checksum How to use checksums |
7e244f54a9b722a27ec32f605cf1121eef2bc4fa5c7b742b56fd8819de49b626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for rdf-fingerprinter 3.8.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rdf_fingerprinter-3.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA 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.