Skip to main content

A triplestore wrapper for Python.

Project description

Tripper logo

PyPI Documentation CI tests DOI

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:

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. A minimal installation can be done with

pip install tripper

but typically, you would also like to install the requirements needed by the backends, the tripper sub-packages and extra features. The requirements for the backends are listed in the table above, while sub-packages and extra features are enabled by specifying one or more of the "extras" listed in the table below when installing Tripper.

For example, the following command will install Tripper with the tripper.datadoc sub-package and the rdflib backend enabled:

pip install tripper[datadoc] rdflib

Developers should install Tripper with the dev extras and enable pre-commit:

pip install tripper[dev]
pre-commit install  # Enable pre-commit and installing hooks
Extras Description of dependencies Implies
units Required by the tripper.units sub-package.
mappings Required by the tripper.mappings sub-package. units
datadoc Required by the tripper.datadoc sub-package. mappings
backends Installs dependencies for all backends
testing For testing. datadoc,backends
docs For generation of documentation testing
dev For developers. Installs all dependencies, including pre-commit. dev

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


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.4.3.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tripper-0.4.3-py3-none-any.whl (129.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tripper-0.4.3.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tripper-0.4.3.tar.gz
Algorithm Hash digest
SHA256 9d3bc60c7aa199bbdc9122a517dfccbcd5b21d60ff0bc25b1a50dcbb2528a7aa
MD5 6aea9598ae253d0c0d868723d3d1f216
BLAKE2b-256 0c039bff4c80a7fcd1cbf4e51c7aba0992fd8532bc36dd45464d33e350b8a715

See more details on using hashes here.

Provenance

The following attestation bundles were made for tripper-0.4.3.tar.gz:

Publisher: cd_release.yml on EMMC-ASBL/tripper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: tripper-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 129.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tripper-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b56624730955cc9cf4a3b0e9187062b760c5e8396795e525e669b6c7165f9ab0
MD5 b5f73eebb486982e4efcd60e0fa373ee
BLAKE2b-256 df18eda933c2e4db1a305bc539337c4efa5bab429bf8b4ed79ef63c0afde6eb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for tripper-0.4.3-py3-none-any.whl:

Publisher: cd_release.yml on EMMC-ASBL/tripper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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