graph_db_interface
This repository acts as an interface to abstract SPARQL queries to callable methods to interact with a running GraphDB instance in an easier way.
Installation
To install the current PyPI release, simply run the following command using your preferred python interpreter:
pip install graph-db-interface
Or after cloning this repository you can also use poetry to install the package:
poetry install
Getting Started
The package uses a single class named GraphDB. To use the interface, simply generate an object from this class:
from graph_db_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"
poetry run pytest tests -v
Note: application/runtime credentials loaded via GraphDBCredentials.from_env() still use GRAPHDB_REPOSITORY by default.
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 graph-db-interface 2.0.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 | Provenance | Actions |
|---|---|---|---|---|
| graph_db_interface-2.0.1.tar.gz | 27.5 kB | With provenance | Details for graph_db_interface-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graph_db_interface-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for graph_db_interface-2.0.1-py3-none-any.whl |
Total release size: 62.8 kB
Release files / graph_db_interface-2.0.1.tar.gz
| Download URL | graph_db_interface-2.0.1.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfc98e0c858a915fdf992bb9b33841c2cc6d048aae2f0c8e8497033e7af294ff
|
|
BLAKE2b-256 checksum How to use checksums |
1ddc64016b9c7e9fd9571c699c1ac42444a359f6071df6e6e449e63e09c782bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 27, 2026.
Transparency logRelease files / graph_db_interface-2.0.1-py3-none-any.whl
| Download URL | graph_db_interface-2.0.1-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
befee2ba2fc9da43cf82d1d4a975fc4066a3c2f1a12c2de8d3ef41d6c1407e3f
|
|
BLAKE2b-256 checksum How to use checksums |
3d4f8e8789c1d1d478d9d15eda73618145129137f8e6c4c8b9ea2a8c0b8d98ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 27, 2026.
Transparency logSecurity for graph-db-interface 2.0.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for graph_db_interface-2.0.1.tar.gz
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 Mar 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.