A triplestore wrapper for Python.
Project description
Tripper
Triplestore wrapper for Python providing a simple and consistent interface to a range of triplestore backends.
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.
Advanced features
The submodules mappings
and convert
provide additional functionality beyond interfacing triplestore backends:
- 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. |
fuseki | PyBackTrip | sparqlwrapper | Backend to fuseki. |
stardog | PyBackTrip | sparqlwrapper,pystardog | Backend to StarDog. |
graphdb | PyBackTrip | sparqlwrapper | Backend to GraphDB. |
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.
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.3.4.tar.gz
.
File metadata
- Download URL: tripper-0.3.4.tar.gz
- Upload date:
- Size: 97.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71e471784f3845634c195daf4852bbae0e743145d01bf75389789ed652af7d1b |
|
MD5 | 7c296b56ed02f71b4843892edf8e3dd2 |
|
BLAKE2b-256 | b525e60a6d3fd33bf491c138207e5cad0309b236cc281c41915d3d3b2bf7c496 |
File details
Details for the file tripper-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: tripper-0.3.4-py3-none-any.whl
- Upload date:
- Size: 57.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0da05cdb9c393a04df46ad7006653442ddb60d097f25f75628566e0353b80433 |
|
MD5 | 45b9756d814c9679de3097c740e49233 |
|
BLAKE2b-256 | 8153d38448a7c94350170b8847f946d2d231eca8a8c139749b6039a1f4316f3b |