Skip to main content

RDF fingerprinter

Understand the structure of your RDF data at a glance using automatically built application profiles and spot differences between dataset structures.

An application profile, in this context, is the set of data shapes designed for a particular purpose acting as constraints on how the data are instantiated and so can be used to validate the data.

Fingerprinting is the action of generating, or rather, guessing, the application profile applied to a particular dataset. This is an inductive process of reconstructing the data shape for each class instantiated in the dataset.

ci codecov docs

PyPI PyPI - Status PyPI - Python Version PyPI - License PyPI - Wheel

Documentation: https://meaningfy-ws.github.io/rdf-fingerprinter/

Installation

RDF fingerprinter may be installed with pip as follows.

pip install rdf-fingerprinter

Python 3.12 or later is required (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.

What it does

  • 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.

Usage

The easiest way to build a fingerprint of a SPARQL endpoint is by calling the fingeprinting CLI command and write the report in an output folder.

fingerprint -e http://my.sparql.endpoint.com -o my/output/folder

To use the fingerprinter programmatically, 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 my/output/folder/profile.json -o llm/ --ontology vocab.ttl --max-classes 30
fingerprint-gen-shex    my/output/folder/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).

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 and Schemas for LLMs.

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

You are more than welcome to help expand and mature this project. We adhere to Apache code of conduct, please follow it in all your interactions on the project.

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the maintainers of this repository before making a change.

Licence

This project is licensed under Apache License 2.0.

Metadata

Release files for rdf-fingerprinter 3.6.1

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

Source distribution (sdist)

Source distribution for rdf-fingerprinter 3.6.1
File Size Uploaded Provenance Actions
rdf_fingerprinter-3.6.1.tar.gz 166.6 kB With provenance Details for rdf_fingerprinter-3.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rdf-fingerprinter 3.6.1
File Interpreter ABI Platform Actions
rdf_fingerprinter-3.6.1-py3-none-any.whl Python 3 none any Details for rdf_fingerprinter-3.6.1-py3-none-any.whl

Total release size: 389.9 kB

Release files / rdf_fingerprinter-3.6.1.tar.gz

Download URL rdf_fingerprinter-3.6.1.tar.gz
Size 166.6 kB
Tags Source
SHA-256 checksum
How to use checksums
69b69e6b68826b542809d2070569acf7eee6cfc24bfc343f29aa7305892f8cdc
BLAKE2b-256 checksum
How to use checksums
9230691d5f917acee0466a824e579343d4da73623547cdda00124c8ebb9553db
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 8, 2026.

Transparency log

Release files / rdf_fingerprinter-3.6.1-py3-none-any.whl

Download URL rdf_fingerprinter-3.6.1-py3-none-any.whl
Size 223.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cde2d624ea32ccd8c0ebd7e5b566051928358b95772ea968c5ba40931632975d
BLAKE2b-256 checksum
How to use checksums
2545d9097e42c8bb5f6d9099ab3a7abd6a7a3e9778d24c2ed6b7c3d0bb9d0213
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 8, 2026.

Transparency log

Security for rdf-fingerprinter 3.6.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rdf_fingerprinter-3.6.1.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 8, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

3.6.1 This release

2 release files Full provenance

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