rdf4j-python 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rdf4j_python/__init__.py +11 -6
- rdf4j_python/_client/_client.py +156 -5
- rdf4j_python/_driver/__init__.py +6 -4
- rdf4j_python/_driver/_async_named_graph.py +75 -0
- rdf4j_python/_driver/_async_rdf4j_db.py +64 -36
- rdf4j_python/_driver/_async_repository.py +348 -17
- rdf4j_python/exception/__init__.py +5 -0
- rdf4j_python/exception/repo_exception.py +32 -2
- rdf4j_python/model/__init__.py +13 -0
- rdf4j_python/model/_base_model.py +26 -4
- rdf4j_python/model/_dataset.py +38 -0
- rdf4j_python/model/_namespace.py +134 -0
- rdf4j_python/model/{repository.py → _repository_info.py} +15 -4
- rdf4j_python/model/repository_config.py +1447 -0
- rdf4j_python/model/term.py +14 -0
- rdf4j_python/model/vocabulary.py +6 -0
- rdf4j_python/utils/__init__.py +3 -0
- rdf4j_python/utils/const.py +4 -4
- rdf4j_python/utils/helpers.py +22 -0
- rdf4j_python-0.1.2.dist-info/METADATA +77 -0
- rdf4j_python-0.1.2.dist-info/RECORD +25 -0
- {rdf4j_python-0.1.0.dist-info → rdf4j_python-0.1.2.dist-info}/WHEEL +1 -1
- rdf4j_python-0.1.2.dist-info/licenses/LICENSE +28 -0
- rdf4j_python-0.1.0.dist-info/METADATA +0 -8
- rdf4j_python-0.1.0.dist-info/RECORD +0 -15
- {rdf4j_python-0.1.0.dist-info → rdf4j_python-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -7,9 +7,9 @@ from ._base_model import _BaseModel
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@dataclass
|
|
10
|
-
class
|
|
10
|
+
class RepositoryMetadata(_BaseModel):
|
|
11
11
|
"""
|
|
12
|
-
Represents a repository
|
|
12
|
+
Represents a repository metadata RDF4J.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
id: str # The repository identifier
|
|
@@ -19,16 +19,27 @@ class RepositoryInfo(_BaseModel):
|
|
|
19
19
|
writable: bool # Whether the repository is writable
|
|
20
20
|
|
|
21
21
|
def __str__(self):
|
|
22
|
-
|
|
22
|
+
"""
|
|
23
|
+
Returns a string representation of the RepositoryMetadata.
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
str: A string representation of the RepositoryMetadata.
|
|
27
|
+
"""
|
|
23
28
|
return f"Repository(id={self.id}, title={self.title}, uri={self.uri})"
|
|
24
29
|
|
|
25
30
|
@classmethod
|
|
26
31
|
def from_rdflib_binding(
|
|
27
32
|
cls, result: Mapping[Variable, Identifier]
|
|
28
|
-
) -> "
|
|
33
|
+
) -> "RepositoryMetadata":
|
|
29
34
|
"""
|
|
30
35
|
Create a Repository instance from a SPARQL query result
|
|
31
36
|
represented as a Mapping from rdflib Variables to Identifiers.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
result (Mapping[Variable, Identifier]): The SPARQL query result.
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
RepositoryMetadata: The RepositoryMetadata instance.
|
|
32
43
|
"""
|
|
33
44
|
|
|
34
45
|
# Construct and return the Repository object
|