A triplestore wrapper for Python.
Project description
Triplestore wrapper for Python providing a simple and consistent interface to a range of triplestore backends
Tripper
Getting started
Basic concepts
Tripper provides a simple and consistent interface to a range of triplestore backends. It strives for simplicity and is modelled after rdflib (with a few simplifications).
In Tripper:
-
All IRIs are represented by Python strings. Example:
"https://w3id.org/emmo#Metre"
-
Blank nodes are strings starting with "_:". Example:
"_:bnode1"
-
Literals are constructed with
tripper.Literal
. Example:tripper.Literal(3.14, datatype=XSD.float)
To make it easy to work with IRIs, provide Tripper a set of pre-defined namespaces, like XSD.float
.
New namespaces can be defined with the tripper.Namespace
class.
A triplestore wrapper is created with the tripper.Triplestore
class.
Sub-packages
Additional functionality beyond interfacing triplestore backends is provided by specialised sub-package:
- tripper.datadoc: An API for data documentation.
- tripper.units: Working with units and quantities defined in ontologies.
- tripper.mappings: Traverse mappings stored in the triplestore and find possible mapping routes.
- tripper.convert: Convert between RDF and other data representations.
Available backends
The following backends are currently available, either in Tripper or other packages.
Backend name | Provided by | Requirements | Comment |
---|---|---|---|
rdflib | tripper | rdflib | In-memory rdflib triplestore supporting all features. |
ontopy | tripper | EMMOntoPy | Backend for EMMOntoPy. In-memory. |
sparqlwrapper | tripper | sparqlwrapper | Generic backend for all triplestores supported by sparqlwrapper. |
collection | tripper | DLite-Python | Backend to a DLite collection. |
graphdb | tripper | sparqlwrapper | Backend to GraphDB. |
fuseki | PyBackTrip | sparqlwrapper | Backend to fuseki. |
stardog | PyBackTrip | sparqlwrapper,pystardog | Backend to StarDog. |
Installation
Tripper has by itself no dependencies outside the standard library, but the triplestore backends may have specific dependencies.
The package can be installed from PyPI using pip
:
pip install tripper
In addition you would need to install the requirements for one or more of the backends listed in the table above. For mappings you would also need to install Pint. For example:
pip install rdflib pint
License and copyright
All files in this repository are licensed under the MIT license. If not stated otherwise in the top of the files, they have copyright © 2022 SINTEF.
Acknowledgements
We gratefully acknowledge the following projects for supporting the development of Tripper:
- OntoTrans (2020-2024) that receives funding from the European Union's Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 862136.
- OpenModel (2021-2025) that receives funding from the European Union's Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 953167.
- SFI PhysMet (2020-2028) funded by Forskningsrådet and Norwegian industry partners.
- DOME 4.0 (2021-2025) that receives funding from the European Union's Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 953163.
- VIPCOAT (2021-2025) that receives funding from the European Union's Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 952903.
- MEDIATE (2022-2025) that receives funding from the RCN, Norway; FNR, Luxenburg; SMWK Germany via the M-era.net programme, project 9557,
- MatCHMaker (2022-2026) that receives funding from the European Union's Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 101091687.
- PINK (2024-2027) that receives funding from the European Union's Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 101137809.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tripper-0.4.2.tar.gz
.
File metadata
- Download URL: tripper-0.4.2.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ec974811fb77a9e51cf8f640692de3676b4fe33a8adab768d71e4811ea88af78
|
|
MD5 |
1856aae9272bb181fe6b60652b42757e
|
|
BLAKE2b-256 |
ed434792cdbaf2b08590cb2dc9d206000c32b5bb5f608c7c99cd9180f962610e
|
Provenance
The following attestation bundles were made for tripper-0.4.2.tar.gz
:
Publisher:
cd_release.yml
on EMMC-ASBL/tripper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
tripper-0.4.2.tar.gz
-
Subject digest:
ec974811fb77a9e51cf8f640692de3676b4fe33a8adab768d71e4811ea88af78
- Sigstore transparency entry: 201613673
- Sigstore integration time:
-
Permalink:
EMMC-ASBL/tripper@9e59c0842f0fcda938208a8a67b1817524d7704b
-
Branch / Tag:
refs/tags/v0.4.2
- Owner: https://github.com/EMMC-ASBL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
cd_release.yml@9e59c0842f0fcda938208a8a67b1817524d7704b
-
Trigger Event:
release
-
Statement type:
File details
Details for the file tripper-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: tripper-0.4.2-py3-none-any.whl
- Upload date:
- Size: 118.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
63d00292ca905dc224cbf0a7328648745542e5ca447cf6e90ed9653f76ddacaa
|
|
MD5 |
2ae83edbee52164126f63eac9906f02f
|
|
BLAKE2b-256 |
26cc8cd728ec8d8aeddc4153b014896a32924526744f72e75d61d42d5421c0a6
|
Provenance
The following attestation bundles were made for tripper-0.4.2-py3-none-any.whl
:
Publisher:
cd_release.yml
on EMMC-ASBL/tripper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
tripper-0.4.2-py3-none-any.whl
-
Subject digest:
63d00292ca905dc224cbf0a7328648745542e5ca447cf6e90ed9653f76ddacaa
- Sigstore transparency entry: 201613680
- Sigstore integration time:
-
Permalink:
EMMC-ASBL/tripper@9e59c0842f0fcda938208a8a67b1817524d7704b
-
Branch / Tag:
refs/tags/v0.4.2
- Owner: https://github.com/EMMC-ASBL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
cd_release.yml@9e59c0842f0fcda938208a8a67b1817524d7704b
-
Trigger Event:
release
-
Statement type: