python-arango-async 0.0.2__tar.gz → 0.0.4__tar.gz
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.
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.github/workflows/pypi.yaml +5 -1
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/PKG-INFO +67 -29
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/README.md +63 -3
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/aql.py +5 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/client.py +3 -1
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/collection.py +1738 -788
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/connection.py +3 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/database.py +242 -23
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/exceptions.py +52 -0
- python_arango_async-0.0.4/arangoasync/graph.py +1050 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/http.py +22 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/typings.py +247 -5
- python_arango_async-0.0.4/arangoasync/version.py +1 -0
- python_arango_async-0.0.4/docs/aql.rst +171 -0
- python_arango_async-0.0.4/docs/async.rst +148 -0
- python_arango_async-0.0.4/docs/authentication.rst +117 -0
- python_arango_async-0.0.4/docs/certificates.rst +110 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/collection.rst +10 -1
- python_arango_async-0.0.4/docs/compression.rst +56 -0
- python_arango_async-0.0.4/docs/cursor.rst +217 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/database.rst +2 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/document.rst +36 -14
- python_arango_async-0.0.4/docs/errno.rst +22 -0
- python_arango_async-0.0.4/docs/errors.rst +119 -0
- python_arango_async-0.0.4/docs/graph.rst +415 -0
- python_arango_async-0.0.4/docs/helpers.rst +88 -0
- python_arango_async-0.0.4/docs/http.rst +136 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/index.rst +19 -8
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/indexes.rst +6 -4
- python_arango_async-0.0.4/docs/logging.rst +30 -0
- python_arango_async-0.0.4/docs/migration.rst +94 -0
- python_arango_async-0.0.4/docs/overview.rst +125 -0
- python_arango_async-0.0.4/docs/serialization.rst +189 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/specs.rst +3 -6
- python_arango_async-0.0.4/docs/transaction.rst +81 -0
- python_arango_async-0.0.4/docs/user.rst +93 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/pyproject.toml +4 -4
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/python_arango_async.egg-info/PKG-INFO +67 -29
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/python_arango_async.egg-info/SOURCES.txt +12 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/conftest.py +14 -2
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/helpers.py +9 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_async.py +1 -1
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_client.py +9 -9
- python_arango_async-0.0.4/tests/test_graph.py +404 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_typings.py +56 -0
- python_arango_async-0.0.2/arangoasync/version.py +0 -1
- python_arango_async-0.0.2/docs/aql.rst +0 -10
- python_arango_async-0.0.2/docs/async.rst +0 -6
- python_arango_async-0.0.2/docs/errno.rst +0 -19
- python_arango_async-0.0.2/docs/errors.rst +0 -20
- python_arango_async-0.0.2/docs/overview.rst +0 -40
- python_arango_async-0.0.2/docs/transaction.rst +0 -5
- python_arango_async-0.0.2/docs/user.rst +0 -5
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.circleci/config.yml +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.github/workflows/codeql.yaml +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.github/workflows/docs.yaml +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.gitignore +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.pre-commit-config.yaml +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/.readthedocs.yaml +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/CONTRIBUTING.md +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/LICENSE +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/__init__.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/auth.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/compression.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/cursor.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/errno.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/executor.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/job.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/logger.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/request.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/resolver.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/response.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/result.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/arangoasync/serialization.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/conf.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/docs/static/logo.png +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/python_arango_async.egg-info/dependency_links.txt +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/python_arango_async.egg-info/requires.txt +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/python_arango_async.egg-info/top_level.txt +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/setup.cfg +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/setup.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/starter.sh +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/__init__.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/static/cluster-3.11.conf +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/static/cluster-3.12.conf +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/static/keyfile +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/static/single-3.11.conf +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/static/single-3.12.conf +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_aql.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_collection.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_compression.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_connection.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_cursor.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_database.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_document.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_http.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_resolver.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_transaction.py +0 -0
- {python_arango_async-0.0.2 → python_arango_async-0.0.4}/tests/test_user.py +0 -0
|
@@ -1,45 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-arango-async
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Async Python Driver for ArangoDB
|
|
5
5
|
Author-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
6
6
|
Maintainer-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2024 ArangoDB
|
|
10
|
-
|
|
11
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions:
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|
|
28
|
-
|
|
7
|
+
License-Expression: MIT
|
|
29
8
|
Project-URL: homepage, https://github.com/arangodb/python-arango-async
|
|
30
9
|
Keywords: arangodb,python,driver,async
|
|
31
10
|
Classifier: Intended Audience :: Developers
|
|
32
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
33
11
|
Classifier: Natural Language :: English
|
|
34
12
|
Classifier: Operating System :: OS Independent
|
|
35
13
|
Classifier: Programming Language :: Python :: 3
|
|
36
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
37
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
38
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
39
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
40
18
|
Classifier: Topic :: Documentation :: Sphinx
|
|
41
19
|
Classifier: Typing :: Typed
|
|
42
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.10
|
|
43
21
|
Description-Content-Type: text/markdown
|
|
44
22
|
License-File: LICENSE
|
|
45
23
|
Requires-Dist: packaging>=23.1
|
|
@@ -68,7 +46,7 @@ Dynamic: license-file
|
|
|
68
46
|
[](https://github.com/arangodb/python-arango-async/commits/main)
|
|
69
47
|
|
|
70
48
|
[](https://pypi.org/project/python-arango-async/)
|
|
71
|
-
[](https://pypi.org/project/python-arango-async/)
|
|
72
50
|
|
|
73
51
|
[](https://github.com/arangodb/python-arango/blob/main/LICENSE)
|
|
74
52
|
[](https://github.com/psf/black)
|
|
@@ -80,7 +58,7 @@ Dynamic: license-file
|
|
|
80
58
|
Python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model
|
|
81
59
|
database natively supporting documents, graphs and search.
|
|
82
60
|
|
|
83
|
-
This is the _asyncio_ alternative of the
|
|
61
|
+
This is the _asyncio_ alternative of the [python-arango](https://github.com/arangodb/python-arango)
|
|
84
62
|
driver.
|
|
85
63
|
|
|
86
64
|
**Note: This project is still in active development, features might be added or removed.**
|
|
@@ -88,7 +66,7 @@ driver.
|
|
|
88
66
|
## Requirements
|
|
89
67
|
|
|
90
68
|
- ArangoDB version 3.11+
|
|
91
|
-
- Python version 3.
|
|
69
|
+
- Python version 3.10+
|
|
92
70
|
|
|
93
71
|
## Installation
|
|
94
72
|
|
|
@@ -136,7 +114,67 @@ async def main():
|
|
|
136
114
|
student_names = []
|
|
137
115
|
async for doc in cursor:
|
|
138
116
|
student_names.append(doc["name"])
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Another example with [graphs](https://docs.arangodb.com/stable/graphs/):
|
|
139
120
|
|
|
121
|
+
```python
|
|
122
|
+
async def main():
|
|
123
|
+
from arangoasync import ArangoClient
|
|
124
|
+
from arangoasync.auth import Auth
|
|
125
|
+
|
|
126
|
+
# Initialize the client for ArangoDB.
|
|
127
|
+
async with ArangoClient(hosts="http://localhost:8529") as client:
|
|
128
|
+
auth = Auth(username="root", password="passwd")
|
|
129
|
+
|
|
130
|
+
# Connect to "test" database as root user.
|
|
131
|
+
db = await client.db("test", auth=auth)
|
|
132
|
+
|
|
133
|
+
# Get the API wrapper for graph "school".
|
|
134
|
+
if await db.has_graph("school"):
|
|
135
|
+
graph = db.graph("school")
|
|
136
|
+
else:
|
|
137
|
+
graph = await db.create_graph("school")
|
|
138
|
+
|
|
139
|
+
# Create vertex collections for the graph.
|
|
140
|
+
students = await graph.create_vertex_collection("students")
|
|
141
|
+
lectures = await graph.create_vertex_collection("lectures")
|
|
142
|
+
|
|
143
|
+
# Create an edge definition (relation) for the graph.
|
|
144
|
+
edges = await graph.create_edge_definition(
|
|
145
|
+
edge_collection="register",
|
|
146
|
+
from_vertex_collections=["students"],
|
|
147
|
+
to_vertex_collections=["lectures"]
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# Insert vertex documents into "students" (from) vertex collection.
|
|
151
|
+
await students.insert({"_key": "01", "full_name": "Anna Smith"})
|
|
152
|
+
await students.insert({"_key": "02", "full_name": "Jake Clark"})
|
|
153
|
+
await students.insert({"_key": "03", "full_name": "Lisa Jones"})
|
|
154
|
+
|
|
155
|
+
# Insert vertex documents into "lectures" (to) vertex collection.
|
|
156
|
+
await lectures.insert({"_key": "MAT101", "title": "Calculus"})
|
|
157
|
+
await lectures.insert({"_key": "STA101", "title": "Statistics"})
|
|
158
|
+
await lectures.insert({"_key": "CSC101", "title": "Algorithms"})
|
|
159
|
+
|
|
160
|
+
# Insert edge documents into "register" edge collection.
|
|
161
|
+
await edges.insert({"_from": "students/01", "_to": "lectures/MAT101"})
|
|
162
|
+
await edges.insert({"_from": "students/01", "_to": "lectures/STA101"})
|
|
163
|
+
await edges.insert({"_from": "students/01", "_to": "lectures/CSC101"})
|
|
164
|
+
await edges.insert({"_from": "students/02", "_to": "lectures/MAT101"})
|
|
165
|
+
await edges.insert({"_from": "students/02", "_to": "lectures/STA101"})
|
|
166
|
+
await edges.insert({"_from": "students/03", "_to": "lectures/CSC101"})
|
|
167
|
+
|
|
168
|
+
# Traverse the graph in outbound direction, breath-first.
|
|
169
|
+
query = """
|
|
170
|
+
FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'
|
|
171
|
+
OPTIONS { bfs: true, uniqueVertices: 'global' }
|
|
172
|
+
RETURN {vertex: v, edge: e, path: p}
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
async with await db.aql.execute(query) as cursor:
|
|
176
|
+
async for doc in cursor:
|
|
177
|
+
print(doc)
|
|
140
178
|
```
|
|
141
179
|
|
|
142
180
|
Please see the [documentation](https://python-arango-async.readthedocs.io/en/latest/) for more details.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/arangodb/python-arango-async/commits/main)
|
|
6
6
|
|
|
7
7
|
[](https://pypi.org/project/python-arango-async/)
|
|
8
|
-
[](https://pypi.org/project/python-arango-async/)
|
|
9
9
|
|
|
10
10
|
[](https://github.com/arangodb/python-arango/blob/main/LICENSE)
|
|
11
11
|
[](https://github.com/psf/black)
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model
|
|
18
18
|
database natively supporting documents, graphs and search.
|
|
19
19
|
|
|
20
|
-
This is the _asyncio_ alternative of the
|
|
20
|
+
This is the _asyncio_ alternative of the [python-arango](https://github.com/arangodb/python-arango)
|
|
21
21
|
driver.
|
|
22
22
|
|
|
23
23
|
**Note: This project is still in active development, features might be added or removed.**
|
|
@@ -25,7 +25,7 @@ driver.
|
|
|
25
25
|
## Requirements
|
|
26
26
|
|
|
27
27
|
- ArangoDB version 3.11+
|
|
28
|
-
- Python version 3.
|
|
28
|
+
- Python version 3.10+
|
|
29
29
|
|
|
30
30
|
## Installation
|
|
31
31
|
|
|
@@ -73,7 +73,67 @@ async def main():
|
|
|
73
73
|
student_names = []
|
|
74
74
|
async for doc in cursor:
|
|
75
75
|
student_names.append(doc["name"])
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Another example with [graphs](https://docs.arangodb.com/stable/graphs/):
|
|
76
79
|
|
|
80
|
+
```python
|
|
81
|
+
async def main():
|
|
82
|
+
from arangoasync import ArangoClient
|
|
83
|
+
from arangoasync.auth import Auth
|
|
84
|
+
|
|
85
|
+
# Initialize the client for ArangoDB.
|
|
86
|
+
async with ArangoClient(hosts="http://localhost:8529") as client:
|
|
87
|
+
auth = Auth(username="root", password="passwd")
|
|
88
|
+
|
|
89
|
+
# Connect to "test" database as root user.
|
|
90
|
+
db = await client.db("test", auth=auth)
|
|
91
|
+
|
|
92
|
+
# Get the API wrapper for graph "school".
|
|
93
|
+
if await db.has_graph("school"):
|
|
94
|
+
graph = db.graph("school")
|
|
95
|
+
else:
|
|
96
|
+
graph = await db.create_graph("school")
|
|
97
|
+
|
|
98
|
+
# Create vertex collections for the graph.
|
|
99
|
+
students = await graph.create_vertex_collection("students")
|
|
100
|
+
lectures = await graph.create_vertex_collection("lectures")
|
|
101
|
+
|
|
102
|
+
# Create an edge definition (relation) for the graph.
|
|
103
|
+
edges = await graph.create_edge_definition(
|
|
104
|
+
edge_collection="register",
|
|
105
|
+
from_vertex_collections=["students"],
|
|
106
|
+
to_vertex_collections=["lectures"]
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# Insert vertex documents into "students" (from) vertex collection.
|
|
110
|
+
await students.insert({"_key": "01", "full_name": "Anna Smith"})
|
|
111
|
+
await students.insert({"_key": "02", "full_name": "Jake Clark"})
|
|
112
|
+
await students.insert({"_key": "03", "full_name": "Lisa Jones"})
|
|
113
|
+
|
|
114
|
+
# Insert vertex documents into "lectures" (to) vertex collection.
|
|
115
|
+
await lectures.insert({"_key": "MAT101", "title": "Calculus"})
|
|
116
|
+
await lectures.insert({"_key": "STA101", "title": "Statistics"})
|
|
117
|
+
await lectures.insert({"_key": "CSC101", "title": "Algorithms"})
|
|
118
|
+
|
|
119
|
+
# Insert edge documents into "register" edge collection.
|
|
120
|
+
await edges.insert({"_from": "students/01", "_to": "lectures/MAT101"})
|
|
121
|
+
await edges.insert({"_from": "students/01", "_to": "lectures/STA101"})
|
|
122
|
+
await edges.insert({"_from": "students/01", "_to": "lectures/CSC101"})
|
|
123
|
+
await edges.insert({"_from": "students/02", "_to": "lectures/MAT101"})
|
|
124
|
+
await edges.insert({"_from": "students/02", "_to": "lectures/STA101"})
|
|
125
|
+
await edges.insert({"_from": "students/03", "_to": "lectures/CSC101"})
|
|
126
|
+
|
|
127
|
+
# Traverse the graph in outbound direction, breath-first.
|
|
128
|
+
query = """
|
|
129
|
+
FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'
|
|
130
|
+
OPTIONS { bfs: true, uniqueVertices: 'global' }
|
|
131
|
+
RETURN {vertex: v, edge: e, path: p}
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
async with await db.aql.execute(query) as cursor:
|
|
135
|
+
async for doc in cursor:
|
|
136
|
+
print(doc)
|
|
77
137
|
```
|
|
78
138
|
|
|
79
139
|
Please see the [documentation](https://python-arango-async.readthedocs.io/en/latest/) for more details.
|
|
@@ -238,6 +238,11 @@ class AQL:
|
|
|
238
238
|
"""Return the name of the current database."""
|
|
239
239
|
return self._executor.db_name
|
|
240
240
|
|
|
241
|
+
@property
|
|
242
|
+
def context(self) -> str:
|
|
243
|
+
"""Return the current API execution context."""
|
|
244
|
+
return self._executor.context
|
|
245
|
+
|
|
241
246
|
@property
|
|
242
247
|
def serializer(self) -> Serializer[Json]:
|
|
243
248
|
"""Return the serializer."""
|
|
@@ -139,7 +139,9 @@ class ArangoClient:
|
|
|
139
139
|
|
|
140
140
|
async def close(self) -> None:
|
|
141
141
|
"""Close HTTP sessions."""
|
|
142
|
-
await asyncio.gather(
|
|
142
|
+
await asyncio.gather(
|
|
143
|
+
*(self._http_client.close_session(session) for session in self._sessions)
|
|
144
|
+
)
|
|
143
145
|
|
|
144
146
|
async def db(
|
|
145
147
|
self,
|