rdf4j-python 0.1.5__py3-none-any.whl → 0.1.6__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/_client/_client.py +6 -0
- rdf4j_python/_driver/_async_rdf4j_db.py +7 -2
- {rdf4j_python-0.1.5.dist-info → rdf4j_python-0.1.6.dist-info}/METADATA +1 -1
- {rdf4j_python-0.1.5.dist-info → rdf4j_python-0.1.6.dist-info}/RECORD +7 -7
- {rdf4j_python-0.1.5.dist-info → rdf4j_python-0.1.6.dist-info}/WHEEL +0 -0
- {rdf4j_python-0.1.5.dist-info → rdf4j_python-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {rdf4j_python-0.1.5.dist-info → rdf4j_python-0.1.6.dist-info}/top_level.txt +0 -0
rdf4j_python/_client/_client.py
CHANGED
|
@@ -273,3 +273,9 @@ class AsyncApiClient(BaseClient):
|
|
|
273
273
|
return await self.client.delete(
|
|
274
274
|
self._build_url(path), params=params, headers=headers
|
|
275
275
|
)
|
|
276
|
+
|
|
277
|
+
async def aclose(self):
|
|
278
|
+
"""
|
|
279
|
+
Asynchronously closes the client connection.
|
|
280
|
+
"""
|
|
281
|
+
await self.client.aclose()
|
|
@@ -26,6 +26,7 @@ class AsyncRdf4j:
|
|
|
26
26
|
base_url (str): Base URL of the RDF4J server.
|
|
27
27
|
"""
|
|
28
28
|
self._base_url = base_url.rstrip("/")
|
|
29
|
+
self._client = AsyncApiClient(base_url=self._base_url)
|
|
29
30
|
|
|
30
31
|
async def __aenter__(self):
|
|
31
32
|
"""Enters the async context and initializes the HTTP client.
|
|
@@ -33,7 +34,7 @@ class AsyncRdf4j:
|
|
|
33
34
|
Returns:
|
|
34
35
|
AsyncRdf4j: The initialized RDF4J interface.
|
|
35
36
|
"""
|
|
36
|
-
self._client = await
|
|
37
|
+
self._client = await self._client.__aenter__()
|
|
37
38
|
return self
|
|
38
39
|
|
|
39
40
|
async def __aexit__(self, exc_type, exc_value, traceback):
|
|
@@ -103,7 +104,7 @@ class AsyncRdf4j:
|
|
|
103
104
|
RepositoryCreationException: If repository creation fails.
|
|
104
105
|
"""
|
|
105
106
|
path = f"/repositories/{config.repo_id}"
|
|
106
|
-
headers = {"Content-Type": Rdf4jContentType.TURTLE}
|
|
107
|
+
headers = {"Content-Type": Rdf4jContentType.TURTLE.value}
|
|
107
108
|
response: httpx.Response = await self._client.put(
|
|
108
109
|
path, content=config.to_turtle(), headers=headers
|
|
109
110
|
)
|
|
@@ -128,3 +129,7 @@ class AsyncRdf4j:
|
|
|
128
129
|
raise RepositoryDeletionException(
|
|
129
130
|
f"Failed to delete repository '{repository_id}': {response.status_code} - {response.text}"
|
|
130
131
|
)
|
|
132
|
+
|
|
133
|
+
async def aclose(self):
|
|
134
|
+
"""Asynchronously closes the client connection."""
|
|
135
|
+
await self._client.aclose()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
rdf4j_python/__init__.py,sha256=E8gojaWuLHo2AfNn5HBc5cF7K8_dK2jOBcZaH_qoZs4,347
|
|
2
2
|
rdf4j_python/_client/__init__.py,sha256=L5q5RTHXCNyHp2WNP4xTemGXNntUW4RF_QJPoCWciUQ,98
|
|
3
|
-
rdf4j_python/_client/_client.py,sha256=
|
|
3
|
+
rdf4j_python/_client/_client.py,sha256=7UXmvhjY4ThT6PWAKCqzv5N8ICoCrQZTJ1Ni49qY3ME,8224
|
|
4
4
|
rdf4j_python/_driver/__init__.py,sha256=au0r15mQBVaJkqBknw9CoVswe7_rPPFs1wFWI_ttdy4,224
|
|
5
5
|
rdf4j_python/_driver/_async_named_graph.py,sha256=BqJRpN-JzGpvlSnWY2RrM5TrnIHg6W4PortZ0y-4mgw,2685
|
|
6
|
-
rdf4j_python/_driver/_async_rdf4j_db.py,sha256=
|
|
6
|
+
rdf4j_python/_driver/_async_rdf4j_db.py,sha256=tG0LU_ZxOPgZRvKV_IYc1hzK6pgc7lmHokCo_fna-qc,4663
|
|
7
7
|
rdf4j_python/_driver/_async_repository.py,sha256=bNO4m_0u0uNjz14vXlsyzkVYLUy5cpCSNnvEZg4fG3o,15364
|
|
8
8
|
rdf4j_python/exception/__init__.py,sha256=PFdUyIMsHIL5e2P2z33Qr2pwlUAJVI0G5T8114W4-1A,83
|
|
9
9
|
rdf4j_python/exception/repo_exception.py,sha256=WXlfIYzOYfNU8LpwtOct9fAZADR-P3cZx4jAX9v_HaA,704
|
|
@@ -16,8 +16,8 @@ rdf4j_python/model/vocabulary.py,sha256=Yam0F_YNlO-7wDi2fc0DkAqIKB4ZqCpqq56wKRrF
|
|
|
16
16
|
rdf4j_python/utils/__init__.py,sha256=LAyzkmO5QOIjJogQE1m4Eszwb2cCU8ytKRfhjAGoraw,34
|
|
17
17
|
rdf4j_python/utils/const.py,sha256=HKH9ZGe7m_dvMx1RwT6zhu2HUkvwOX2Y4e8vQFs3uE8,849
|
|
18
18
|
rdf4j_python/utils/helpers.py,sha256=4ubvrx3OV_0Y2_YECNIJhkJUB-JthdCJA8d6Hz_G_kE,506
|
|
19
|
-
rdf4j_python-0.1.
|
|
20
|
-
rdf4j_python-0.1.
|
|
21
|
-
rdf4j_python-0.1.
|
|
22
|
-
rdf4j_python-0.1.
|
|
23
|
-
rdf4j_python-0.1.
|
|
19
|
+
rdf4j_python-0.1.6.dist-info/licenses/LICENSE,sha256=sGjA7CzoCG1LVlkh0ZB76ZdgWHVpUFegLU41YYDkGIA,1499
|
|
20
|
+
rdf4j_python-0.1.6.dist-info/METADATA,sha256=N8qHJEg80NTtczBXrFaKeeLe1Vp8ZSlmKr7WXKdu6o8,7968
|
|
21
|
+
rdf4j_python-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
rdf4j_python-0.1.6.dist-info/top_level.txt,sha256=Lf2K8d8WcEkmvo5giLGuZ3gl20rNEwMssyAFBeVzbCs,13
|
|
23
|
+
rdf4j_python-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|