Skip to main content

A triplestore wrapper for Python.

Project description

Tripper

Triplestore wrapper for Python providing a simple and consistent interface to a range of triplestore backends.

PyPI Documentation CI tests DOI

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: "http://emmo.info/emmo#Atom"

  • 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.

Documentation

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tripper-0.2.15.tar.gz (78.9 kB view details)

Uploaded Source

Built Distribution

tripper-0.2.15-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file tripper-0.2.15.tar.gz.

File metadata

  • Download URL: tripper-0.2.15.tar.gz
  • Upload date:
  • Size: 78.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for tripper-0.2.15.tar.gz
Algorithm Hash digest
SHA256 ac59d93a67aacb7504ec8c2a1b4071bf241217733b7ca75f3ba9ba2792eb5ea6
MD5 81a58f79a149cc3e5ce1f4c501a104b1
BLAKE2b-256 261c12560ab60ba901a3296c235bc2123033ac69e61e340425d5ed20eb1c47ab

See more details on using hashes here.

File details

Details for the file tripper-0.2.15-py3-none-any.whl.

File metadata

  • Download URL: tripper-0.2.15-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for tripper-0.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 dae978ae8d7c6cde48223113a3231e8df448e083851ebbe6a5ad5b6162e459a0
MD5 1ffd67e643df612a83ce99ee669b1805
BLAKE2b-256 c8538e2f1f240ae5ef6d48c67b86a545a73b627e3794dd27726d80cf4a8bd1dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page