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? 1.0 needs Python 3.12+, runs on eds4jinja2 2 (pandas 3 / numpy 2) and no longer configures logging when imported: configure it in your application. See the CHANGELOG.

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 (compact (:Class)-property-> (:Target) lines with statistics and a glossary of labels) 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

On the test data, the pattern schema of a graph is about nine times smaller than its SHACL shapes (1,234 against 10,950 characters, prefixes and legend left out).

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, unit tests — the gate CI runs
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.3.0

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.3.0
File Size Uploaded Provenance Actions
rdf_fingerprinter-3.3.0.tar.gz 148.0 kB With provenance Details for rdf_fingerprinter-3.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 343.1 kB

Release files / rdf_fingerprinter-3.3.0.tar.gz

Download URL rdf_fingerprinter-3.3.0.tar.gz
Size 148.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d15fac4d43258b1befe08d59ed7baa99ba5096af94ef0113bf5cd5d267b02e95
BLAKE2b-256 checksum
How to use checksums
686e3430b29b3e1023f4b6fd143c12c4ca9a75677ed250913be41e85f21520fb
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 1, 2026.

Transparency log

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

Download URL rdf_fingerprinter-3.3.0-py3-none-any.whl
Size 195.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a9ad00ad31ef6d05213b6f7cb36e01d80d5a46f8de0a4035c57c7cc5f16ccf0
BLAKE2b-256 checksum
How to use checksums
3edabab361ba36a837243233cca14140a5b307d85e7f9432cfbf21710c927eb4
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 1, 2026.

Transparency log

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

Select from 2 files

Attestation for rdf_fingerprinter-3.3.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 1, 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.3.0 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