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.4.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.4.1
File Size Uploaded Provenance Actions
rdf_fingerprinter-3.4.1.tar.gz 152.9 kB With provenance Details for rdf_fingerprinter-3.4.1.tar.gz

Built distribution (wheel)

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

Total release size: 354.5 kB

Release files / rdf_fingerprinter-3.4.1.tar.gz

Download URL rdf_fingerprinter-3.4.1.tar.gz
Size 152.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9fa3d9b0b8ccd1a66f6f108a87d803552e3315938e2a51c45fb626ffe447c23f
BLAKE2b-256 checksum
How to use checksums
6e6bccea993d50c740a2b31c8b23fcb6c9ae0b9a57d90556db85cd1400434d45
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 3, 2026.

Transparency log

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

Download URL rdf_fingerprinter-3.4.1-py3-none-any.whl
Size 201.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e70594bcd0e9791c949423145d03250c065ccb1acd6129792886ce5b8fae31ea
BLAKE2b-256 checksum
How to use checksums
bcc92e7ff7bacb9a8a4af47cb2497d0eec53c68650ad8f9d99cba23978a3de5b
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 3, 2026.

Transparency log

Security for rdf-fingerprinter 3.4.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.4.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 3, 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.4.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