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: 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.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.6.0
File Size Uploaded Provenance Actions
rdf_fingerprinter-3.6.0.tar.gz 165.8 kB With provenance Details for rdf_fingerprinter-3.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 388.7 kB

Release files / rdf_fingerprinter-3.6.0.tar.gz

Download URL rdf_fingerprinter-3.6.0.tar.gz
Size 165.8 kB
Tags Source
SHA-256 checksum
How to use checksums
87f485ba08ebc25e174a2e95b0a13cc75002b94a5f91ad791f6f4827ebf3af21
BLAKE2b-256 checksum
How to use checksums
562a3be709a859f03724ca99f7a0fd78f4c0b41e57c0442bab57f00c6f5b11a4
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.0-py3-none-any.whl

Download URL rdf_fingerprinter-3.6.0-py3-none-any.whl
Size 222.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
287c7fe96ccdb9f10aed03514757de9342317c46e01619242c1d8bacf8adf215
BLAKE2b-256 checksum
How to use checksums
bcf2b41a169bee468bc9f82fe5f14ea85d2b908b44be47d498edfdab04a3f8cf
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.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.6.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 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.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