rdf4j
Modules:
-
client–RDF4J client module.
-
exceptions–RDF4J exceptions.
-
util–RDF4J utility functions.
Classes:
-
RDF4JClient–RDF4J client.
Attributes:
RDF4JClient
RDF4JClient(base_url: str, auth: tuple[str, str] | str | None = None, timeout: float | Timeout = 30.0, **kwargs: Any)
RDF4J client.
This client and its inner management objects perform HTTP requests via httpx and may raise httpx-specific exceptions. Errors documented by RDF4J in its protocol specification are mapped to specific exceptions in this library where applicable. Error mappings are documented on each management method. The underlying httpx client is reused across requests, and connection pooling is handled automatically by httpx.
Parameters:
-
(base_urlstr) –The base URL of the RDF4J server.
-
(authtuple[str, str] | str | None, default:None) –Authentication credentials. Can be a tuple (username, password) for basic auth, or a string for token-based auth (e.g., “GDB
“) which is added as the Authorization header. -
(timeoutfloat | Timeout, default:30.0) –Request timeout in seconds or an httpx.Timeout for fine-grained control (default: 30.0).
-
(kwargsAny, default:{}) –Additional keyword arguments to pass to the httpx.Client.
Methods:
Attributes:
-
http_client– -
protocol(float) –The RDF4J REST API protocol version.
-
repositories(RepositoryManager) –Server-level repository management operations.
Source code in rdflib/contrib/rdf4j/client.py
protocol
property
The RDF4J REST API protocol version.
Returns:
-
float–The protocol version number.
repositories
property
repositories: RepositoryManager
Server-level repository management operations.