kapps-triplestore-interface
This library turns SPARQL queries and updates against a running GraphDB triplestore into callable Python methods. Three research projects run it in production.
Installation
pip install kapps-triplestore-interface
Or, from a clone of this repository:
uv sync
Getting Started
The package uses a single class named GraphDB. To use the interface, create an object from
this class:
from kapps_triplestore_interface import GraphDB, GraphDBCredentials
credentials = GraphDBCredentials(
base_url="<your_graph_db_url>",
username="<your_graph_db_user>",
password="<your_graph_db_password>",
repository="<your_selected_repository_id>",
)
my_db = GraphDB(credentials=credentials)
Running Tests
The test suite expects a running GraphDB instance and uses a dedicated test repository.
Required environment variables for tests:
GRAPHDB_URLGRAPHDB_USERNAMEGRAPHDB_PASSWORDGRAPHDB_TEST_REPOSITORY
Example:
export GRAPHDB_URL="http://localhost:7200"
export GRAPHDB_USERNAME="admin"
export GRAPHDB_PASSWORD="root"
export GRAPHDB_TEST_REPOSITORY="test-repo"
uv run pytest tests -v
Note: application/runtime credentials loaded via GraphDBCredentials.from_env() still use
GRAPHDB_REPOSITORY by default.
Contributing
Development happens in a private repository at KIT. This GitHub repository is a publish target. A pull request opened here cannot be merged back. Raise an issue instead, or contact the maintainers.
Origin
This is a renamed fork of
JaFeKl/graph_db_interface by Jan-Felix Klein,
last released as graph-db-interface 2.0.1 on
PyPI under an MIT license. It is maintained here, and changes since then are listed in
CHANGELOG.md.
Migration from graph-db-interface
- Change your dependency from
graph-db-interfacetokapps-triplestore-interface. - Change imports from
from graph_db_interface import ...tofrom kapps_triplestore_interface import .... - If you catch it, change
GraphDBInterfaceErrortoTripleStoreInterfaceError.
License
The package is licensed under the MIT license.
Acknowledgements
This package is developed as part of the INF subproject of the CRC 1574: Circular Factory for the Perpetual Product. This work is therefore supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) [grant-number: SFB-1574-471687386].
Metadata
Release files for kapps-triplestore-interface 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kapps_triplestore_interface-2.1.1.tar.gz | 93.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kapps_triplestore_interface-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.3 kB
Release files / kapps_triplestore_interface-2.1.1.tar.gz
| Download URL | kapps_triplestore_interface-2.1.1.tar.gz |
|---|---|
| Size | 93.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd6456f30f011f9340f0e577ff2868750fb8e1c03a5a04768488d6cd1ee32d6c
|
|
BLAKE2b-256 checksum How to use checksums |
8ca20fe7b9f83abc7149fce2604a0def2a1a08cc0b02f1323e5fd2a7d5eae54a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 17, 2026.
Transparency logRelease files / kapps_triplestore_interface-2.1.1-py3-none-any.whl
| Download URL | kapps_triplestore_interface-2.1.1-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4be16caded92e61d87421a48b28f8551af298d99a0574764a49fe919770cfe0
|
|
BLAKE2b-256 checksum How to use checksums |
a8ba4dc18f7339db43bd55754f4b2cc2da053b848ec965dd4aff1698a2b0de8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 17, 2026.
Transparency log