python-arango 8.2.2__py3-none-any.whl → 8.2.4__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.
arango/aql.py CHANGED
@@ -17,6 +17,7 @@ from arango.exceptions import (
17
17
  AQLQueryClearError,
18
18
  AQLQueryExecuteError,
19
19
  AQLQueryExplainError,
20
+ AQLQueryHistoryError,
20
21
  AQLQueryKillError,
21
22
  AQLQueryListError,
22
23
  AQLQueryRulesGetError,
@@ -627,6 +628,23 @@ class AQL(ApiGroup):
627
628
 
628
629
  return self._execute(request, response_handler)
629
630
 
631
+ def history(self) -> Result[Json]:
632
+ """Return recently executed AQL queries (admin only).
633
+
634
+ :return: AQL query history.
635
+ :rtype: dict
636
+ :raise arango.exceptions.AQLQueryHistoryError: If retrieval fails.
637
+ """
638
+ request = Request(method="get", endpoint="/_admin/server/aql-queries")
639
+
640
+ def response_handler(resp: Response) -> Json:
641
+ if not resp.is_success:
642
+ raise AQLQueryHistoryError(resp, request)
643
+ res: Json = resp.body["result"]
644
+ return res
645
+
646
+ return self._execute(request, response_handler)
647
+
630
648
  def functions(self) -> Result[Jsons]:
631
649
  """List the AQL functions defined in the database.
632
650
 
arango/database.py CHANGED
@@ -44,6 +44,7 @@ from arango.exceptions import (
44
44
  PermissionListError,
45
45
  PermissionResetError,
46
46
  PermissionUpdateError,
47
+ ServerAPICallsError,
47
48
  ServerAvailableOptionsGetError,
48
49
  ServerCheckAvailabilityError,
49
50
  ServerCurrentOptionsGetError,
@@ -463,6 +464,26 @@ class Database(ApiGroup):
463
464
 
464
465
  return self._execute(request, response_handler)
465
466
 
467
+ def api_calls(self) -> Result[Json]:
468
+ """Return recent API calls (admin only).
469
+
470
+ :return: API calls history.
471
+ :rtype: dict
472
+ :raise arango.exceptions.ServerAPICallsError: If retrieval fails.
473
+ """
474
+ request = Request(
475
+ method="get",
476
+ endpoint="/_admin/server/api-calls",
477
+ )
478
+
479
+ def response_handler(resp: Response) -> Json:
480
+ if not resp.is_success:
481
+ raise ServerAPICallsError(resp, request)
482
+ res: Json = resp.body["result"]
483
+ return res
484
+
485
+ return self._execute(request, response_handler)
486
+
466
487
  def status(self) -> Result[Json]:
467
488
  """Return ArangoDB server status.
468
489
 
arango/exceptions.py CHANGED
@@ -121,6 +121,10 @@ class AQLQueryTrackingGetError(ArangoServerError):
121
121
  """Failed to retrieve AQL tracking properties."""
122
122
 
123
123
 
124
+ class AQLQueryHistoryError(ArangoServerError):
125
+ """Failed to retrieve recent AQL queries."""
126
+
127
+
124
128
  class AQLQueryTrackingSetError(ArangoServerError):
125
129
  """Failed to configure AQL tracking properties."""
126
130
 
@@ -638,6 +642,10 @@ class ServerDetailsError(ArangoServerError):
638
642
  """Failed to retrieve server details."""
639
643
 
640
644
 
645
+ class ServerAPICallsError(ArangoServerError):
646
+ """Failed to retrieve recent API calls."""
647
+
648
+
641
649
  class ServerLicenseGetError(ArangoServerError):
642
650
  """Failed to retrieve server license."""
643
651
 
arango/formatter.py CHANGED
@@ -116,6 +116,10 @@ def format_index(body: Json, formatter: bool = True) -> Json:
116
116
  if "optimizeTopK" in body:
117
117
  result["optimizeTopK"] = body["optimizeTopK"]
118
118
 
119
+ # Introduced via Vector Index in 3.12.6
120
+ if "params" in body:
121
+ result["params"] = body["params"]
122
+
119
123
  return verify_format(body, result)
120
124
 
121
125
 
@@ -899,6 +903,10 @@ def format_view_consolidation_policy(body: Json) -> Json:
899
903
  result["segments_bytes_floor"] = body["segmentsBytesFloor"]
900
904
  if "minScore" in body:
901
905
  result["min_score"] = body["minScore"]
906
+ if "maxSkewThreshold" in body:
907
+ result["max_skew_threshold"] = body["maxSkewThreshold"]
908
+ if "minDeletionRatio" in body:
909
+ result["min_deletion_ratio"] = body["minDeletionRatio"]
902
910
 
903
911
  return verify_format(body, result)
904
912
 
arango/request.py CHANGED
@@ -12,7 +12,7 @@ def normalize_headers(
12
12
  if driver_flags is not None:
13
13
  for flag in driver_flags:
14
14
  flags = flags + flag + ";"
15
- driver_version = "8.2.2"
15
+ driver_version = "8.2.4"
16
16
  driver_header = "python-arango/" + driver_version + " (" + flags + ")"
17
17
  normalized_headers: Headers = {
18
18
  "charset": "utf-8",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.2.2
3
+ Version: 8.2.4
4
4
  Summary: Python Driver for ArangoDB
5
5
  Author-email: Joohwan Oh <joohwan.oh@outlook.com>
6
6
  Maintainer-email: Joohwan Oh <joohwan.oh@outlook.com>, Alexandru Petenchea <alex.petenchea@gmail.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
@@ -1,17 +1,17 @@
1
1
  arango/__init__.py,sha256=SFKHBP0iYw1c4mJbLn6pxiGIKVUpsS_nQcZ0aEptrZw,192
2
2
  arango/api.py,sha256=OzN3d4p1fagRG_BXnjgrp0TeE__hQmm9WDEkjefa6UA,1956
3
- arango/aql.py,sha256=61nCcs_WNW13lTeWsMQR_pRLZ2h-o2QXHB5WkoatfuA,30181
3
+ arango/aql.py,sha256=iGm9CiZ6hz7GNNyKTW0YpAcqHBdFB12fP4gYbVyBZgs,30806
4
4
  arango/backup.py,sha256=lK7ihCRPrsBlQ35KtyYplhX6Lw0GzqCbGTLPbPTBh20,8651
5
5
  arango/client.py,sha256=JRBNNdYfv7PliYE4SvRPV2YICfHcJJe5zmwuZCTRv00,11838
6
6
  arango/cluster.py,sha256=PBixBJnAWsC2oApZnXUGbA-EjxbIqGKrUUtZJrqqQT4,18454
7
7
  arango/collection.py,sha256=T5pu4h9AAk6qB3EjvmkXPYco3X_AqC3lbvafZ47_QNI,140272
8
8
  arango/connection.py,sha256=9IjNMZfAK_bSr3GT7BxCyg3X1yPQQNk2r9H0qbn7Qi0,18867
9
9
  arango/cursor.py,sha256=4iIhYXWwzHnxKKk0oNk-ynNeQ1BWJDS4gy1ApzYtNl8,11156
10
- arango/database.py,sha256=T229fC83MUMuCY7hXrW1dYiVilNE363rvPu0cZ6uciI,129535
10
+ arango/database.py,sha256=C26cYjr1sqinq9KYEoLB6bvk2sJuI5P2yjsM_lTEX8M,130179
11
11
  arango/errno.py,sha256=4oKY9IyyzjOitbywhjH8S214qeNtpDlQg7JsHENJNoU,25245
12
- arango/exceptions.py,sha256=JVtT86oL-DSxe4bl_wH-U8sM-mC5_xd8qzpy9cCqGKs,25675
12
+ arango/exceptions.py,sha256=h_CJbL5fKTGIlET7EXOJsHCVlky-X3NjC5eHAOlPjMo,25868
13
13
  arango/executor.py,sha256=ahez3ar-FLZLWv4pu1IYhAi_EdhbwsME82N_hkB1PSw,16000
14
- arango/formatter.py,sha256=VR_SqlBQa1QJ31Ft8k5PRE9q0ySk2CgFQojhltAyYSE,42210
14
+ arango/formatter.py,sha256=iEGYm_QVztLvxfav_n2JG0ChdAjmXWZQEDR3pb324VA,42520
15
15
  arango/foxx.py,sha256=JJrsfgWzGMqEobi3f_VGLYXEQrk2vsGJwfQeWTM6SGA,32737
16
16
  arango/graph.py,sha256=UPxiN0JgyzZGYc1aZZ1tiiOsz9fStInEGS6SySDaFW0,36282
17
17
  arango/http.py,sha256=36Us7VBcOcHH2kdWg8ZpPkD-4Po8U5ScQvR1MATGVr0,10215
@@ -19,15 +19,15 @@ arango/job.py,sha256=yLjlMVuSK5ibcyf3zAHozMzMXPSYk769A-VUfyNrY9c,7054
19
19
  arango/pregel.py,sha256=AqL8o8YaPYN_LkJiGhQTfXN_AzjGGoAr4nl-e5jus4A,5749
20
20
  arango/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  arango/replication.py,sha256=r8kZJuJ186spTdU2x20P4ctoDELzMcexN5KuPTflNrg,33924
22
- arango/request.py,sha256=Wbz6mLia0K1PW6hfinh_CP70BpyLsGBuTm83DQfcrYU,4124
22
+ arango/request.py,sha256=o9t_FsBZEKuh6aust3sodtu59RtFr8qdEtzeC0gJi5g,4124
23
23
  arango/resolver.py,sha256=hhTJHzNKrg3KpzmKIa-eZSogUBwQuWAID5yfHJ9RYH8,4215
24
24
  arango/response.py,sha256=n55yXyrsUldOQV8FYUgX9PiVvTW-R9nVOyDUTcnsN1o,2164
25
25
  arango/result.py,sha256=nILp1HZCl06awosbDi1AL_LCDDXV0DEi1KBkywG6uoI,168
26
26
  arango/typings.py,sha256=G8BKOORxaVKSS3kaxHjVaXD0TIJkd1Cs8j2nuKwSKlQ,779
27
27
  arango/utils.py,sha256=PGUH06T4NXnr5-wGa13s4hAOpj_JcPwlFfbGiywueIY,4694
28
28
  arango/wal.py,sha256=aqt0ET7mP2FH9x4KHw15B4ZiEa0jYTyUdUs2rD2Zwmo,11207
29
- python_arango-8.2.2.dist-info/licenses/LICENSE,sha256=e86a4kkFfMBuoffCn4RLmQGC2LUqNs78i5npEsJ1b5I,1072
30
- python_arango-8.2.2.dist-info/METADATA,sha256=ExyUbpfC5BABVS06ZQWdRgU_0amAl_y2z_szEoEcWwk,8363
31
- python_arango-8.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
- python_arango-8.2.2.dist-info/top_level.txt,sha256=F8H1mznbOGduHSsSET9uiPd72kJ1fGbejiuzYMm9XqA,7
33
- python_arango-8.2.2.dist-info/RECORD,,
29
+ python_arango-8.2.4.dist-info/licenses/LICENSE,sha256=e86a4kkFfMBuoffCn4RLmQGC2LUqNs78i5npEsJ1b5I,1072
30
+ python_arango-8.2.4.dist-info/METADATA,sha256=ND83vFwDMMKZZmvXWTzzh-egPBvfV4Qk18-Z27BFe84,8363
31
+ python_arango-8.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
+ python_arango-8.2.4.dist-info/top_level.txt,sha256=F8H1mznbOGduHSsSET9uiPd72kJ1fGbejiuzYMm9XqA,7
33
+ python_arango-8.2.4.dist-info/RECORD,,