python-arango-async 1.0.2__tar.gz → 1.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.
Files changed (110) hide show
  1. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.circleci/config.yml +5 -5
  2. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/CONTRIBUTING.md +1 -1
  3. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/PKG-INFO +3 -2
  4. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/README.md +1 -1
  5. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/aql.py +39 -19
  6. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/auth.py +2 -2
  7. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/backup.py +6 -6
  8. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/client.py +6 -2
  9. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/cluster.py +12 -12
  10. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/collection.py +45 -45
  11. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/cursor.py +3 -3
  12. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/database.py +190 -96
  13. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/exceptions.py +16 -0
  14. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/foxx.py +21 -21
  15. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/graph.py +19 -19
  16. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/job.py +5 -5
  17. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/replication.py +7 -7
  18. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/typings.py +75 -23
  19. python_arango_async-1.0.4/arangoasync/version.py +1 -0
  20. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/analyzer.rst +1 -1
  21. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/aql.rst +1 -1
  22. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/backup.rst +1 -1
  23. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/certificates.rst +1 -1
  24. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/cluster.rst +1 -1
  25. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/document.rst +1 -1
  26. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/foxx.rst +1 -1
  27. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/graph.rst +1 -1
  28. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/indexes.rst +1 -1
  29. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/overview.rst +1 -1
  30. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/view.rst +3 -3
  31. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/pyproject.toml +1 -0
  32. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/python_arango_async.egg-info/PKG-INFO +3 -2
  33. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/python_arango_async.egg-info/SOURCES.txt +0 -2
  34. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/python_arango_async.egg-info/requires.txt +1 -0
  35. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/conftest.py +46 -8
  36. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/helpers.py +9 -0
  37. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_analyzer.py +2 -2
  38. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_aql.py +8 -5
  39. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_backup.py +9 -22
  40. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_client.py +59 -4
  41. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_cluster.py +2 -2
  42. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_database.py +2 -2
  43. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_foxx.py +10 -8
  44. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_graph.py +2 -2
  45. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_task.py +4 -1
  46. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_transaction.py +4 -1
  47. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_typings.py +26 -0
  48. python_arango_async-1.0.2/arangoasync/version.py +0 -1
  49. python_arango_async-1.0.2/tests/static/cluster-3.11.conf +0 -14
  50. python_arango_async-1.0.2/tests/static/single-3.11.conf +0 -12
  51. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.github/workflows/codeql.yaml +0 -0
  52. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.github/workflows/docs.yaml +0 -0
  53. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.github/workflows/pypi.yaml +0 -0
  54. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.gitignore +0 -0
  55. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.pre-commit-config.yaml +0 -0
  56. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/.readthedocs.yaml +0 -0
  57. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/LICENSE +0 -0
  58. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/__init__.py +0 -0
  59. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/compression.py +0 -0
  60. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/connection.py +0 -0
  61. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/errno.py +0 -0
  62. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/executor.py +0 -0
  63. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/http.py +0 -0
  64. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/logger.py +0 -0
  65. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/request.py +0 -0
  66. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/resolver.py +0 -0
  67. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/response.py +0 -0
  68. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/result.py +0 -0
  69. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/arangoasync/serialization.py +0 -0
  70. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/admin.rst +0 -0
  71. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/async.rst +0 -0
  72. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/authentication.rst +0 -0
  73. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/collection.rst +0 -0
  74. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/compression.rst +0 -0
  75. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/conf.py +0 -0
  76. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/cursor.rst +0 -0
  77. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/database.rst +0 -0
  78. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/errno.rst +0 -0
  79. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/errors.rst +0 -0
  80. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/helpers.rst +0 -0
  81. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/http.rst +0 -0
  82. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/index.rst +0 -0
  83. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/logging.rst +0 -0
  84. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/migration.rst +0 -0
  85. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/serialization.rst +0 -0
  86. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/specs.rst +0 -0
  87. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/static/logo.png +0 -0
  88. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/task.rst +0 -0
  89. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/transaction.rst +0 -0
  90. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/docs/user.rst +0 -0
  91. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/python_arango_async.egg-info/dependency_links.txt +0 -0
  92. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/python_arango_async.egg-info/top_level.txt +0 -0
  93. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/setup.cfg +0 -0
  94. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/setup.py +0 -0
  95. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/starter.sh +0 -0
  96. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/__init__.py +0 -0
  97. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/static/cluster-3.12.conf +0 -0
  98. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/static/keyfile +0 -0
  99. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/static/service.zip +0 -0
  100. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/static/single-3.12.conf +0 -0
  101. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_async.py +0 -0
  102. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_collection.py +0 -0
  103. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_compression.py +0 -0
  104. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_connection.py +0 -0
  105. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_cursor.py +0 -0
  106. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_document.py +0 -0
  107. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_http.py +0 -0
  108. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_resolver.py +0 -0
  109. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_user.py +0 -0
  110. {python_arango_async-1.0.2 → python_arango_async-1.0.4}/tests/test_view.py +0 -0
@@ -7,7 +7,7 @@ executors:
7
7
  resource_class: small
8
8
  python-vm:
9
9
  machine:
10
- image: ubuntu-2204:current
10
+ image: ubuntu-2404:current
11
11
  resource_class: medium
12
12
 
13
13
  workflows:
@@ -20,8 +20,8 @@ workflows:
20
20
  parameters:
21
21
  python_version: ["3.10", "3.11", "3.12"]
22
22
  arangodb_config: ["single", "cluster"]
23
- arangodb_license: ["community", "enterprise"]
24
- arangodb_version: ["3.11", "3.12"]
23
+ arangodb_license: ["enterprise"]
24
+ arangodb_version: ["3.12"]
25
25
 
26
26
  jobs:
27
27
  lint:
@@ -86,8 +86,8 @@ jobs:
86
86
  args+=("--cluster" "--port=8539" "--port=8549")
87
87
  fi
88
88
 
89
- if [ << parameters.arangodb_license >> = "enterprise" ]; then
90
- args+=("--enterprise")
89
+ if [ << parameters.arangodb_license >> != "enterprise" ]; then
90
+ args+=("--skip" "enterprise")
91
91
  fi
92
92
 
93
93
  echo "Running pytest with args: ${args[@]}"
@@ -10,7 +10,7 @@ pre-commit install # Install git pre-commit hooks
10
10
  Run unit tests with coverage:
11
11
 
12
12
  ```shell
13
- pytest --enterprise --cluster --cov=arango --cov-report=html # Open htmlcov/index.html in your browser
13
+ pytest --cluster --cov=arango --cov-report=html # Open htmlcov/index.html in your browser
14
14
  ```
15
15
 
16
16
  To start and ArangoDB instance locally, run:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango-async
3
- Version: 1.0.2
3
+ Version: 1.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>
@@ -37,6 +37,7 @@ Requires-Dist: pytest-asyncio>=0.23.8; extra == "dev"
37
37
  Requires-Dist: pytest-cov>=5.0; extra == "dev"
38
38
  Requires-Dist: sphinx>=7.3; extra == "dev"
39
39
  Requires-Dist: sphinx_rtd_theme>=2.0; extra == "dev"
40
+ Requires-Dist: allure-pytest>=2.15; extra == "dev"
40
41
  Requires-Dist: types-setuptools; extra == "dev"
41
42
  Dynamic: license-file
42
43
 
@@ -117,7 +118,7 @@ async def main():
117
118
  student_names.append(doc["name"])
118
119
  ```
119
120
 
120
- Another example with [graphs](https://docs.arangodb.com/stable/graphs/):
121
+ Another example with [graphs](https://docs.arango.ai/stable/graphs/):
121
122
 
122
123
  ```python
123
124
  async def main():
@@ -75,7 +75,7 @@ async def main():
75
75
  student_names.append(doc["name"])
76
76
  ```
77
77
 
78
- Another example with [graphs](https://docs.arangodb.com/stable/graphs/):
78
+ Another example with [graphs](https://docs.arango.ai/stable/graphs/):
79
79
 
80
80
  ```python
81
81
  async def main():
@@ -16,6 +16,7 @@ from arangoasync.exceptions import (
16
16
  AQLQueryClearError,
17
17
  AQLQueryExecuteError,
18
18
  AQLQueryExplainError,
19
+ AQLQueryHistoryError,
19
20
  AQLQueryKillError,
20
21
  AQLQueryListError,
21
22
  AQLQueryRulesGetError,
@@ -77,7 +78,7 @@ class AQLQueryCache:
77
78
  AQLCacheEntriesError: If retrieval fails.
78
79
 
79
80
  References:
80
- - `list-the-entries-of-the-aql-query-results-cache <https://docs.arangodb.com/stable/develop/http-api/queries/aql-query-results-cache/#list-the-entries-of-the-aql-query-results-cache>`__
81
+ - `list-the-entries-of-the-aql-query-results-cache <https://docs.arango.ai/stable/develop/http-api/queries/aql-query-results-cache/#list-the-entries-of-the-aql-query-results-cache>`__
81
82
  """ # noqa: E501
82
83
  request = Request(method=Method.GET, endpoint="/_api/query-cache/entries")
83
84
 
@@ -98,7 +99,7 @@ class AQLQueryCache:
98
99
  AQLCacheEntriesError: If retrieval fails.
99
100
 
100
101
  References:
101
- - `list-the-entries-of-the-aql-query-plan-cache <https://docs.arangodb.com/stable/develop/http-api/queries/aql-query-plan-cache/#list-the-entries-of-the-aql-query-plan-cache>`__
102
+ - `list-the-entries-of-the-aql-query-plan-cache <https://docs.arango.ai/stable/develop/http-api/queries/aql-query-plan-cache/#list-the-entries-of-the-aql-query-plan-cache>`__
102
103
  """ # noqa: E501
103
104
  request = Request(method=Method.GET, endpoint="/_api/query-plan-cache")
104
105
 
@@ -116,7 +117,7 @@ class AQLQueryCache:
116
117
  AQLCacheClearError: If clearing the cache fails.
117
118
 
118
119
  References:
119
- - `clear-the-aql-query-results-cache <https://docs.arangodb.com/stable/develop/http-api/queries/aql-query-results-cache/#clear-the-aql-query-results-cache>`__
120
+ - `clear-the-aql-query-results-cache <https://docs.arango.ai/stable/develop/http-api/queries/aql-query-results-cache/#clear-the-aql-query-results-cache>`__
120
121
  """ # noqa: E501
121
122
  request = Request(method=Method.DELETE, endpoint="/_api/query-cache")
122
123
 
@@ -133,7 +134,7 @@ class AQLQueryCache:
133
134
  AQLCacheClearError: If clearing the cache fails.
134
135
 
135
136
  References:
136
- - `clear-the-aql-query-plan-cache <https://docs.arangodb.com/stable/develop/http-api/queries/aql-query-plan-cache/#clear-the-aql-query-plan-cache>`__
137
+ - `clear-the-aql-query-plan-cache <https://docs.arango.ai/stable/develop/http-api/queries/aql-query-plan-cache/#clear-the-aql-query-plan-cache>`__
137
138
  """ # noqa: E501
138
139
  request = Request(method=Method.DELETE, endpoint="/_api/query-plan-cache")
139
140
 
@@ -153,7 +154,7 @@ class AQLQueryCache:
153
154
  AQLCachePropertiesError: If retrieval fails.
154
155
 
155
156
  References:
156
- - `get-the-aql-query-results-cache-configuration <https://docs.arangodb.com/stable/develop/http-api/queries/aql-query-results-cache/#get-the-aql-query-results-cache-configuration>`__
157
+ - `get-the-aql-query-results-cache-configuration <https://docs.arango.ai/stable/develop/http-api/queries/aql-query-results-cache/#get-the-aql-query-results-cache-configuration>`__
157
158
  """ # noqa: E501
158
159
  request = Request(method=Method.GET, endpoint="/_api/query-cache/properties")
159
160
 
@@ -192,7 +193,7 @@ class AQLQueryCache:
192
193
  AQLCacheConfigureError: If setting the configuration fails.
193
194
 
194
195
  References:
195
- - `set-the-aql-query-results-cache-configuration <https://docs.arangodb.com/stable/develop/http-api/queries/aql-query-results-cache/#set-the-aql-query-results-cache-configuration>`__
196
+ - `set-the-aql-query-results-cache-configuration <https://docs.arango.ai/stable/develop/http-api/queries/aql-query-results-cache/#set-the-aql-query-results-cache-configuration>`__
196
197
  """ # noqa: E501
197
198
  data: Json = dict()
198
199
  if mode is not None:
@@ -297,7 +298,7 @@ class AQL:
297
298
  Cursor: Result cursor.
298
299
 
299
300
  References:
300
- - `create-a-cursor <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#create-a-cursor>`__
301
+ - `create-a-cursor <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#create-a-cursor>`__
301
302
  """ # noqa: E501
302
303
  data: Json = dict(query=query)
303
304
  if count is not None:
@@ -352,7 +353,7 @@ class AQL:
352
353
  AQLQueryTrackingGetError: If retrieval fails.
353
354
 
354
355
  References:
355
- - `get-the-aql-query-tracking-configuration <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#get-the-aql-query-tracking-configuration>`__
356
+ - `get-the-aql-query-tracking-configuration <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#get-the-aql-query-tracking-configuration>`__
356
357
  """ # noqa: E501
357
358
  request = Request(method=Method.GET, endpoint="/_api/query/properties")
358
359
 
@@ -396,7 +397,7 @@ class AQL:
396
397
  AQLQueryTrackingSetError: If setting the configuration fails.
397
398
 
398
399
  References:
399
- - `update-the-aql-query-tracking-configuration <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#update-the-aql-query-tracking-configuration>`__
400
+ - `update-the-aql-query-tracking-configuration <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#update-the-aql-query-tracking-configuration>`__
400
401
  """ # noqa: E501
401
402
  data: Json = dict()
402
403
 
@@ -426,6 +427,25 @@ class AQL:
426
427
 
427
428
  return await self._executor.execute(request, response_handler)
428
429
 
430
+ async def history(self) -> Result[Json]:
431
+ """Return recently executed AQL queries (admin only).
432
+
433
+ Returns:
434
+ dict: AQL query history.
435
+
436
+ Raises:
437
+ AQLQueryHistoryError: If retrieval fails.
438
+ """
439
+ request = Request(method=Method.GET, endpoint="/_admin/server/aql-queries")
440
+
441
+ def response_handler(resp: Response) -> Json:
442
+ if not resp.is_success:
443
+ raise AQLQueryHistoryError(resp, request)
444
+ result: Json = self.deserializer.loads(resp.raw_body)
445
+ return cast(Json, result["result"])
446
+
447
+ return await self._executor.execute(request, response_handler)
448
+
429
449
  async def queries(self, all_queries: bool = False) -> Result[Jsons]:
430
450
  """Return a list of currently running queries.
431
451
 
@@ -442,7 +462,7 @@ class AQL:
442
462
  AQLQueryListError: If retrieval fails.
443
463
 
444
464
  References:
445
- - `list-the-running-queries <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#list-the-running-queries>`__
465
+ - `list-the-running-queries <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#list-the-running-queries>`__
446
466
  """ # noqa: E501
447
467
  request = Request(
448
468
  method=Method.GET,
@@ -473,7 +493,7 @@ class AQL:
473
493
  AQLQueryListError: If retrieval fails.
474
494
 
475
495
  References:
476
- - `list-the-slow-aql-queries <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#list-the-slow-aql-queries>`__
496
+ - `list-the-slow-aql-queries <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#list-the-slow-aql-queries>`__
477
497
  """ # noqa: E501
478
498
  request = Request(
479
499
  method=Method.GET,
@@ -503,7 +523,7 @@ class AQL:
503
523
  AQLQueryClearError: If retrieval fails.
504
524
 
505
525
  References:
506
- - `clear-the-list-of-slow-aql-queries <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#clear-the-list-of-slow-aql-queries>`__
526
+ - `clear-the-list-of-slow-aql-queries <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#clear-the-list-of-slow-aql-queries>`__
507
527
  """ # noqa: E501
508
528
  request = Request(
509
529
  method=Method.DELETE,
@@ -540,7 +560,7 @@ class AQL:
540
560
  AQLQueryKillError: If killing the query fails.
541
561
 
542
562
  References:
543
- - `kill-a-running-aql-query <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#kill-a-running-aql-query>`__
563
+ - `kill-a-running-aql-query <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#kill-a-running-aql-query>`__
544
564
  """ # noqa: E501
545
565
  request = Request(
546
566
  method=Method.DELETE,
@@ -578,7 +598,7 @@ class AQL:
578
598
  AQLQueryExplainError: If retrieval fails.
579
599
 
580
600
  References:
581
- - `explain-an-aql-query <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#explain-an-aql-query>`__
601
+ - `explain-an-aql-query <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#explain-an-aql-query>`__
582
602
  """ # noqa: E501
583
603
  data: Json = dict(query=query)
584
604
  if bind_vars is not None:
@@ -614,7 +634,7 @@ class AQL:
614
634
  AQLQueryValidateError: If validation fails.
615
635
 
616
636
  References:
617
- - `parse-an-aql-query <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#parse-an-aql-query>`__
637
+ - `parse-an-aql-query <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#parse-an-aql-query>`__
618
638
  """ # noqa: E501
619
639
  request = Request(
620
640
  method=Method.POST,
@@ -639,7 +659,7 @@ class AQL:
639
659
  AQLQueryRulesGetError: If retrieval fails.
640
660
 
641
661
  References:
642
- - `list-all-aql-optimizer-rules <https://docs.arangodb.com/stable/develop/http-api/queries/aql-queries/#list-all-aql-optimizer-rules>`__
662
+ - `list-all-aql-optimizer-rules <https://docs.arango.ai/stable/develop/http-api/queries/aql-queries/#list-all-aql-optimizer-rules>`__
643
663
  """ # noqa: E501
644
664
  request = Request(method=Method.GET, endpoint="/_api/query/rules")
645
665
 
@@ -664,7 +684,7 @@ class AQL:
664
684
  AQLFunctionListError: If retrieval fails.
665
685
 
666
686
  References:
667
- - `list-the-registered-user-defined-aql-functions <https://docs.arangodb.com/stable/develop/http-api/queries/user-defined-aql-functions/#list-the-registered-user-defined-aql-functions>`__
687
+ - `list-the-registered-user-defined-aql-functions <https://docs.arango.ai/stable/develop/http-api/queries/user-defined-aql-functions/#list-the-registered-user-defined-aql-functions>`__
668
688
  """ # noqa: E501
669
689
  params: Json = dict()
670
690
  if namespace is not None:
@@ -706,7 +726,7 @@ class AQL:
706
726
  AQLFunctionCreateError: If registration fails.
707
727
 
708
728
  References:
709
- - `create-a-user-defined-aql-function <https://docs.arangodb.com/stable/develop/http-api/queries/user-defined-aql-functions/#create-a-user-defined-aql-function>`__
729
+ - `create-a-user-defined-aql-function <https://docs.arango.ai/stable/develop/http-api/queries/user-defined-aql-functions/#create-a-user-defined-aql-function>`__
710
730
  """ # noqa: E501
711
731
  request = Request(
712
732
  method=Method.POST,
@@ -745,7 +765,7 @@ class AQL:
745
765
  AQLFunctionDeleteError: If removal fails.
746
766
 
747
767
  References:
748
- - `remove-a-user-defined-aql-function <https://docs.arangodb.com/stable/develop/http-api/queries/user-defined-aql-functions/#remove-a-user-defined-aql-function>`__
768
+ - `remove-a-user-defined-aql-function <https://docs.arango.ai/stable/develop/http-api/queries/user-defined-aql-functions/#remove-a-user-defined-aql-function>`__
749
769
  """ # noqa: E501
750
770
  params: Json = dict()
751
771
  if group is not None:
@@ -20,8 +20,8 @@ class Auth:
20
20
  encoding (str): Encoding for the password (default: utf-8)
21
21
  """
22
22
 
23
- username: str
24
- password: str
23
+ username: str = ""
24
+ password: str = ""
25
25
  encoding: str = "utf-8"
26
26
 
27
27
 
@@ -49,7 +49,7 @@ class Backup:
49
49
  BackupGetError: If the operation fails.
50
50
 
51
51
  References:
52
- - `list-backups <https://docs.arangodb.com/stable/develop/http-api/hot-backups/#list-all-backups>`__
52
+ - `list-backups <https://docs.arango.ai/stable/develop/http-api/hot-backups/#list-all-backups>`__
53
53
  """ # noqa: E501
54
54
  data: Json = {}
55
55
  if backup_id is not None:
@@ -97,7 +97,7 @@ class Backup:
97
97
  BackupCreateError: If the backup creation fails.
98
98
 
99
99
  References:
100
- - `create-backup <https://docs.arangodb.com/stable/develop/http-api/hot-backups/#create-a-backup>`__
100
+ - `create-backup <https://docs.arango.ai/stable/develop/http-api/hot-backups/#create-a-backup>`__
101
101
  """ # noqa: E501
102
102
  data: Json = {}
103
103
  if label is not None:
@@ -137,7 +137,7 @@ class Backup:
137
137
  BackupRestoreError: If the restore operation fails.
138
138
 
139
139
  References:
140
- - `restore-backup <https://docs.arangodb.com/stable/develop/http-api/hot-backups/#restore-a-backup>`__
140
+ - `restore-backup <https://docs.arango.ai/stable/develop/http-api/hot-backups/#restore-a-backup>`__
141
141
  """ # noqa: E501
142
142
  data: Json = {"id": backup_id}
143
143
  request = Request(
@@ -165,7 +165,7 @@ class Backup:
165
165
  BackupDeleteError: If the delete operation fails.
166
166
 
167
167
  References:
168
- - `delete-backup <https://docs.arangodb.com/stable/develop/http-api/hot-backups/#delete-a-backup>`__
168
+ - `delete-backup <https://docs.arango.ai/stable/develop/http-api/hot-backups/#delete-a-backup>`__
169
169
  """ # noqa: E501
170
170
  data: Json = {"id": backup_id}
171
171
  request = Request(
@@ -209,7 +209,7 @@ class Backup:
209
209
  BackupUploadError: If upload operation fails.
210
210
 
211
211
  References:
212
- - `upload-a-backup-to-a-remote-repository <https://docs.arangodb.com/stable/develop/http-api/hot-backups/#upload-a-backup-to-a-remote-repository>`__
212
+ - `upload-a-backup-to-a-remote-repository <https://docs.arango.ai/stable/develop/http-api/hot-backups/#upload-a-backup-to-a-remote-repository>`__
213
213
  """ # noqa: E501
214
214
  data: Json = {}
215
215
  if upload_id is not None:
@@ -265,7 +265,7 @@ class Backup:
265
265
  BackupDownloadError: If the download operation fails.
266
266
 
267
267
  References:
268
- - `download-a-backup-from-a-remote-repository <https://docs.arangodb.com/stable/develop/http-api/hot-backups/#download-a-backup-from-a-remote-repository>`__
268
+ - `download-a-backup-from-a-remote-repository <https://docs.arango.ai/stable/develop/http-api/hot-backups/#download-a-backup-from-a-remote-repository>`__
269
269
  """ # noqa: E501
270
270
  data: Json = {}
271
271
  if download_id is not None:
@@ -147,7 +147,7 @@ class ArangoClient:
147
147
  self,
148
148
  name: str,
149
149
  auth_method: str = "basic",
150
- auth: Optional[Auth] = None,
150
+ auth: Optional[Auth | str] = None,
151
151
  token: Optional[JwtToken] = None,
152
152
  verify: bool = False,
153
153
  compression: Optional[CompressionManager] = None,
@@ -169,7 +169,8 @@ class ArangoClient:
169
169
  and client are synchronized.
170
170
  - "superuser": Superuser JWT authentication.
171
171
  The `token` parameter is required. The `auth` parameter is ignored.
172
- auth (Auth | None): Login information.
172
+ auth (Auth | None): Login information (username and password) or
173
+ access token.
173
174
  token (JwtToken | None): JWT token.
174
175
  verify (bool): Verify the connection by sending a test request.
175
176
  compression (CompressionManager | None): If set, supersedes the
@@ -188,6 +189,9 @@ class ArangoClient:
188
189
  """
189
190
  connection: Connection
190
191
 
192
+ if isinstance(auth, str):
193
+ auth = Auth(password=auth)
194
+
191
195
  if auth_method == "basic":
192
196
  if auth is None:
193
197
  raise ValueError("Basic authentication requires the `auth` parameter")
@@ -45,7 +45,7 @@ class Cluster:
45
45
  ClusterHealthError: If retrieval fails.
46
46
 
47
47
  References:
48
- - `get-the-cluster-health <https://docs.arangodb.com/stable/develop/http-api/cluster/#get-the-cluster-health>`__
48
+ - `get-the-cluster-health <https://docs.arango.ai/stable/develop/http-api/cluster/#get-the-cluster-health>`__
49
49
  """ # noqa: E501
50
50
  request = Request(
51
51
  method=Method.GET,
@@ -74,7 +74,7 @@ class Cluster:
74
74
  ClusterStatisticsError: If retrieval fails.
75
75
 
76
76
  References:
77
- - `get-the-statistics-of-a-db-server <https://docs.arangodb.com/stable/develop/http-api/cluster/#get-the-statistics-of-a-db-server>`__
77
+ - `get-the-statistics-of-a-db-server <https://docs.arango.ai/stable/develop/http-api/cluster/#get-the-statistics-of-a-db-server>`__
78
78
  """ # noqa: E501
79
79
  params: Params = {"DBserver": db_server}
80
80
 
@@ -103,7 +103,7 @@ class Cluster:
103
103
  ClusterEndpointsError: If retrieval fails.
104
104
 
105
105
  References:
106
- - `list-all-coordinator-endpoints <https://docs.arangodb.com/stable/develop/http-api/cluster/#list-all-coordinator-endpoints>`__
106
+ - `list-all-coordinator-endpoints <https://docs.arango.ai/stable/develop/http-api/cluster/#list-all-coordinator-endpoints>`__
107
107
  """ # noqa: E501
108
108
  request = Request(
109
109
  method=Method.GET,
@@ -129,7 +129,7 @@ class Cluster:
129
129
  ClusterServerIDError: If retrieval fails.
130
130
 
131
131
  References:
132
- - `get-the-server-id <https://docs.arangodb.com/stable/develop/http-api/cluster/#get-the-server-id>`__
132
+ - `get-the-server-id <https://docs.arango.ai/stable/develop/http-api/cluster/#get-the-server-id>`__
133
133
  """ # noqa: E501
134
134
  request = Request(
135
135
  method=Method.GET,
@@ -154,7 +154,7 @@ class Cluster:
154
154
  ClusterServerRoleError: If retrieval fails.
155
155
 
156
156
  References:
157
- - `get-the-server-role <https://docs.arangodb.com/stable/develop/http-api/cluster/#get-the-server-role>`__
157
+ - `get-the-server-role <https://docs.arango.ai/stable/develop/http-api/cluster/#get-the-server-role>`__
158
158
  """ # noqa: E501
159
159
  request = Request(
160
160
  method=Method.GET,
@@ -182,7 +182,7 @@ class Cluster:
182
182
  ClusterMaintenanceModeError: If the toggle operation fails.
183
183
 
184
184
  References:
185
- - `toggle-cluster-maintenance-mode <https://docs.arangodb.com/stable/develop/http-api/cluster/#toggle-cluster-maintenance-mode>`__
185
+ - `toggle-cluster-maintenance-mode <https://docs.arango.ai/stable/develop/http-api/cluster/#toggle-cluster-maintenance-mode>`__
186
186
  """ # noqa: E501
187
187
  request = Request(
188
188
  method=Method.PUT,
@@ -212,7 +212,7 @@ class Cluster:
212
212
  ClusterMaintenanceModeError: If retrieval fails.
213
213
 
214
214
  References:
215
- - `get-the-maintenance-status-of-a-db-server <https://docs.arangodb.com/stable/develop/http-api/cluster/#get-the-maintenance-status-of-a-db-server>`__
215
+ - `get-the-maintenance-status-of-a-db-server <https://docs.arango.ai/stable/develop/http-api/cluster/#get-the-maintenance-status-of-a-db-server>`__
216
216
  """ # noqa: E501
217
217
  request = Request(
218
218
  method=Method.GET,
@@ -242,7 +242,7 @@ class Cluster:
242
242
  ClusterMaintenanceModeError: If the operation fails.
243
243
 
244
244
  References:
245
- - `set-the-maintenance-status-of-a-db-server <https://docs.arangodb.com/stable/develop/http-api/cluster/#set-the-maintenance-status-of-a-db-server>`__
245
+ - `set-the-maintenance-status-of-a-db-server <https://docs.arango.ai/stable/develop/http-api/cluster/#set-the-maintenance-status-of-a-db-server>`__
246
246
  """ # noqa: E501
247
247
  data: Json = {"mode": mode}
248
248
  if timeout is not None:
@@ -271,7 +271,7 @@ class Cluster:
271
271
  ClusterRebalanceError: If retrieval fails.
272
272
 
273
273
  References:
274
- - `get-the-current-cluster-imbalance <https://docs.arangodb.com/stable/develop/http-api/cluster/#get-the-current-cluster-imbalance>`__
274
+ - `get-the-current-cluster-imbalance <https://docs.arango.ai/stable/develop/http-api/cluster/#get-the-current-cluster-imbalance>`__
275
275
  """ # noqa: E501
276
276
  request = Request(method=Method.GET, endpoint="/_admin/cluster/rebalance")
277
277
 
@@ -315,7 +315,7 @@ class Cluster:
315
315
  ClusterRebalanceError: If retrieval fails.
316
316
 
317
317
  References:
318
- - `compute-a-set-of-move-shard-operations-to-improve-balance <https://docs.arangodb.com/stable/develop/http-api/cluster/#compute-a-set-of-move-shard-operations-to-improve-balance>`__
318
+ - `compute-a-set-of-move-shard-operations-to-improve-balance <https://docs.arango.ai/stable/develop/http-api/cluster/#compute-a-set-of-move-shard-operations-to-improve-balance>`__
319
319
  """ # noqa: E501
320
320
  data: Json = dict(version=version)
321
321
  if databases_excluded is not None:
@@ -380,7 +380,7 @@ class Cluster:
380
380
  ClusterRebalanceError: If retrieval fails.
381
381
 
382
382
  References:
383
- - `compute-and-execute-a-set-of-move-shard-operations-to-improve-balance <https://docs.arangodb.com/stable/develop/http-api/cluster/#compute-and-execute-a-set-of-move-shard-operations-to-improve-balance>`__
383
+ - `compute-and-execute-a-set-of-move-shard-operations-to-improve-balance <https://docs.arango.ai/stable/develop/http-api/cluster/#compute-and-execute-a-set-of-move-shard-operations-to-improve-balance>`__
384
384
  """ # noqa: E501
385
385
  data: Json = dict(version=version)
386
386
  if databases_excluded is not None:
@@ -431,7 +431,7 @@ class Cluster:
431
431
  ClusterRebalanceError: If the execution fails.
432
432
 
433
433
  References:
434
- - `execute-a-set-of-move-shard-operations <https://docs.arangodb.com/stable/develop/http-api/cluster/#execute-a-set-of-move-shard-operations>`__
434
+ - `execute-a-set-of-move-shard-operations <https://docs.arango.ai/stable/develop/http-api/cluster/#execute-a-set-of-move-shard-operations>`__
435
435
  """ # noqa: E501
436
436
  data: Json = dict(version=version, moves=moves)
437
437