python-arango 8.2.1__tar.gz → 8.2.3__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 (91) hide show
  1. {python_arango-8.2.1 → python_arango-8.2.3}/.circleci/config.yml +3 -3
  2. {python_arango-8.2.1 → python_arango-8.2.3}/PKG-INFO +1 -1
  3. {python_arango-8.2.1 → python_arango-8.2.3}/arango/aql.py +18 -0
  4. {python_arango-8.2.1 → python_arango-8.2.3}/arango/backup.py +1 -1
  5. {python_arango-8.2.1 → python_arango-8.2.3}/arango/cluster.py +1 -1
  6. {python_arango-8.2.1 → python_arango-8.2.3}/arango/collection.py +16 -0
  7. {python_arango-8.2.1 → python_arango-8.2.3}/arango/database.py +61 -1
  8. {python_arango-8.2.1 → python_arango-8.2.3}/arango/exceptions.py +16 -0
  9. {python_arango-8.2.1 → python_arango-8.2.3}/arango/request.py +1 -1
  10. {python_arango-8.2.1 → python_arango-8.2.3}/docs/foxx.rst +2 -2
  11. {python_arango-8.2.1 → python_arango-8.2.3}/python_arango.egg-info/PKG-INFO +1 -1
  12. {python_arango-8.2.1 → python_arango-8.2.3}/starter.sh +2 -2
  13. {python_arango-8.2.1 → python_arango-8.2.3}/.github/workflows/codeql.yaml +0 -0
  14. {python_arango-8.2.1 → python_arango-8.2.3}/.github/workflows/docs.yaml +0 -0
  15. {python_arango-8.2.1 → python_arango-8.2.3}/.github/workflows/pypi.yaml +0 -0
  16. {python_arango-8.2.1 → python_arango-8.2.3}/.gitignore +0 -0
  17. {python_arango-8.2.1 → python_arango-8.2.3}/.pre-commit-config.yaml +0 -0
  18. {python_arango-8.2.1 → python_arango-8.2.3}/.readthedocs.yaml +0 -0
  19. {python_arango-8.2.1 → python_arango-8.2.3}/CONTRIBUTING.md +0 -0
  20. {python_arango-8.2.1 → python_arango-8.2.3}/LICENSE +0 -0
  21. {python_arango-8.2.1 → python_arango-8.2.3}/MANIFEST.in +0 -0
  22. {python_arango-8.2.1 → python_arango-8.2.3}/README.md +0 -0
  23. {python_arango-8.2.1 → python_arango-8.2.3}/arango/__init__.py +0 -0
  24. {python_arango-8.2.1 → python_arango-8.2.3}/arango/api.py +0 -0
  25. {python_arango-8.2.1 → python_arango-8.2.3}/arango/client.py +0 -0
  26. {python_arango-8.2.1 → python_arango-8.2.3}/arango/connection.py +0 -0
  27. {python_arango-8.2.1 → python_arango-8.2.3}/arango/cursor.py +0 -0
  28. {python_arango-8.2.1 → python_arango-8.2.3}/arango/errno.py +0 -0
  29. {python_arango-8.2.1 → python_arango-8.2.3}/arango/executor.py +0 -0
  30. {python_arango-8.2.1 → python_arango-8.2.3}/arango/formatter.py +0 -0
  31. {python_arango-8.2.1 → python_arango-8.2.3}/arango/foxx.py +0 -0
  32. {python_arango-8.2.1 → python_arango-8.2.3}/arango/graph.py +0 -0
  33. {python_arango-8.2.1 → python_arango-8.2.3}/arango/http.py +0 -0
  34. {python_arango-8.2.1 → python_arango-8.2.3}/arango/job.py +0 -0
  35. {python_arango-8.2.1 → python_arango-8.2.3}/arango/pregel.py +0 -0
  36. {python_arango-8.2.1 → python_arango-8.2.3}/arango/py.typed +0 -0
  37. {python_arango-8.2.1 → python_arango-8.2.3}/arango/replication.py +0 -0
  38. {python_arango-8.2.1 → python_arango-8.2.3}/arango/resolver.py +0 -0
  39. {python_arango-8.2.1 → python_arango-8.2.3}/arango/response.py +0 -0
  40. {python_arango-8.2.1 → python_arango-8.2.3}/arango/result.py +0 -0
  41. {python_arango-8.2.1 → python_arango-8.2.3}/arango/typings.py +0 -0
  42. {python_arango-8.2.1 → python_arango-8.2.3}/arango/utils.py +0 -0
  43. {python_arango-8.2.1 → python_arango-8.2.3}/arango/wal.py +0 -0
  44. {python_arango-8.2.1 → python_arango-8.2.3}/docs/Makefile +0 -0
  45. {python_arango-8.2.1 → python_arango-8.2.3}/docs/admin.rst +0 -0
  46. {python_arango-8.2.1 → python_arango-8.2.3}/docs/analyzer.rst +0 -0
  47. {python_arango-8.2.1 → python_arango-8.2.3}/docs/aql.rst +0 -0
  48. {python_arango-8.2.1 → python_arango-8.2.3}/docs/async.rst +0 -0
  49. {python_arango-8.2.1 → python_arango-8.2.3}/docs/auth.rst +0 -0
  50. {python_arango-8.2.1 → python_arango-8.2.3}/docs/backup.rst +0 -0
  51. {python_arango-8.2.1 → python_arango-8.2.3}/docs/batch.rst +0 -0
  52. {python_arango-8.2.1 → python_arango-8.2.3}/docs/certificates.rst +0 -0
  53. {python_arango-8.2.1 → python_arango-8.2.3}/docs/cluster.rst +0 -0
  54. {python_arango-8.2.1 → python_arango-8.2.3}/docs/collection.rst +0 -0
  55. {python_arango-8.2.1 → python_arango-8.2.3}/docs/compression.rst +0 -0
  56. {python_arango-8.2.1 → python_arango-8.2.3}/docs/conf.py +0 -0
  57. {python_arango-8.2.1 → python_arango-8.2.3}/docs/contributing.rst +0 -0
  58. {python_arango-8.2.1 → python_arango-8.2.3}/docs/cursor.rst +0 -0
  59. {python_arango-8.2.1 → python_arango-8.2.3}/docs/database.rst +0 -0
  60. {python_arango-8.2.1 → python_arango-8.2.3}/docs/document.rst +0 -0
  61. {python_arango-8.2.1 → python_arango-8.2.3}/docs/errno.rst +0 -0
  62. {python_arango-8.2.1 → python_arango-8.2.3}/docs/errors.rst +0 -0
  63. {python_arango-8.2.1 → python_arango-8.2.3}/docs/graph.rst +0 -0
  64. {python_arango-8.2.1 → python_arango-8.2.3}/docs/http.rst +0 -0
  65. {python_arango-8.2.1 → python_arango-8.2.3}/docs/index.rst +0 -0
  66. {python_arango-8.2.1 → python_arango-8.2.3}/docs/indexes.rst +0 -0
  67. {python_arango-8.2.1 → python_arango-8.2.3}/docs/logging.rst +0 -0
  68. {python_arango-8.2.1 → python_arango-8.2.3}/docs/make.bat +0 -0
  69. {python_arango-8.2.1 → python_arango-8.2.3}/docs/overload.rst +0 -0
  70. {python_arango-8.2.1 → python_arango-8.2.3}/docs/overview.rst +0 -0
  71. {python_arango-8.2.1 → python_arango-8.2.3}/docs/pregel.rst +0 -0
  72. {python_arango-8.2.1 → python_arango-8.2.3}/docs/replication.rst +0 -0
  73. {python_arango-8.2.1 → python_arango-8.2.3}/docs/requirements.txt +0 -0
  74. {python_arango-8.2.1 → python_arango-8.2.3}/docs/schema.rst +0 -0
  75. {python_arango-8.2.1 → python_arango-8.2.3}/docs/serializer.rst +0 -0
  76. {python_arango-8.2.1 → python_arango-8.2.3}/docs/simple.rst +0 -0
  77. {python_arango-8.2.1 → python_arango-8.2.3}/docs/specs.rst +0 -0
  78. {python_arango-8.2.1 → python_arango-8.2.3}/docs/static/logo.png +0 -0
  79. {python_arango-8.2.1 → python_arango-8.2.3}/docs/task.rst +0 -0
  80. {python_arango-8.2.1 → python_arango-8.2.3}/docs/threading.rst +0 -0
  81. {python_arango-8.2.1 → python_arango-8.2.3}/docs/transaction.rst +0 -0
  82. {python_arango-8.2.1 → python_arango-8.2.3}/docs/user.rst +0 -0
  83. {python_arango-8.2.1 → python_arango-8.2.3}/docs/view.rst +0 -0
  84. {python_arango-8.2.1 → python_arango-8.2.3}/docs/wal.rst +0 -0
  85. {python_arango-8.2.1 → python_arango-8.2.3}/pyproject.toml +0 -0
  86. {python_arango-8.2.1 → python_arango-8.2.3}/python_arango.egg-info/SOURCES.txt +0 -0
  87. {python_arango-8.2.1 → python_arango-8.2.3}/python_arango.egg-info/dependency_links.txt +0 -0
  88. {python_arango-8.2.1 → python_arango-8.2.3}/python_arango.egg-info/requires.txt +0 -0
  89. {python_arango-8.2.1 → python_arango-8.2.3}/python_arango.egg-info/top_level.txt +0 -0
  90. {python_arango-8.2.1 → python_arango-8.2.3}/setup.cfg +0 -0
  91. {python_arango-8.2.1 → python_arango-8.2.3}/setup.py +0 -0
@@ -11,10 +11,10 @@ workflows:
11
11
  name: Python (<< matrix.python_version >>) - ArangoDB (<< matrix.arangodb_license >>, << matrix.arangodb_version >> << matrix.arangodb_config >>)
12
12
  matrix:
13
13
  parameters:
14
- python_version: ["3.9", "3.10", "3.11", "3.12"]
14
+ python_version: ["3.10", "3.11", "3.12"]
15
15
  arangodb_config: ["single", "cluster"]
16
- arangodb_license: ["community", "enterprise"]
17
- arangodb_version: ["3.11", "latest"]
16
+ arangodb_license: ["enterprise"]
17
+ arangodb_version: ["latest"]
18
18
 
19
19
  jobs:
20
20
  lint:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.2.1
3
+ Version: 8.2.3
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>
@@ -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
 
@@ -33,7 +33,7 @@ class Backup(ApiGroup): # pragma: no cover
33
33
  :type backup_id: str
34
34
  :return: Backup details.
35
35
  :rtype: dict
36
- :raise arango.exceptions.BackupGetError: If delete fails.
36
+ :raise arango.exceptions.BackupGetError: If the operation fails.
37
37
  """
38
38
  request = Request(
39
39
  method="post",
@@ -261,7 +261,7 @@ class Cluster(ApiGroup): # pragma: no cover
261
261
 
262
262
  :return: List of endpoints.
263
263
  :rtype: [str]
264
- :raise arango.exceptions.ServerEndpointsError: If retrieval fails.
264
+ :raise arango.exceptions.ClusterEndpointsError: If retrieval fails.
265
265
  """
266
266
  request = Request(method="get", endpoint="/_api/cluster/endpoints")
267
267
 
@@ -537,10 +537,18 @@ class Collection(ApiGroup):
537
537
  def load(self) -> Result[bool]:
538
538
  """Load the collection into memory.
539
539
 
540
+ .. note::
541
+ The load function is deprecated from version 3.8.0 onwards and is a
542
+ no-op from version 3.9.0 onwards. It should no longer be used, as it
543
+ may be removed in a future version of ArangoDB.
544
+
540
545
  :return: True if collection was loaded successfully.
541
546
  :rtype: bool
542
547
  :raise arango.exceptions.CollectionLoadError: If operation fails.
543
548
  """
549
+ m = "The load function is deprecated from version 3.8.0 onwards and is a no-op from version 3.9.0 onwards." # noqa: E501
550
+ warn(m, DeprecationWarning, stacklevel=2)
551
+
544
552
  request = Request(method="put", endpoint=f"/_api/collection/{self.name}/load")
545
553
 
546
554
  def response_handler(resp: Response) -> bool:
@@ -553,10 +561,18 @@ class Collection(ApiGroup):
553
561
  def unload(self) -> Result[bool]:
554
562
  """Unload the collection from memory.
555
563
 
564
+ .. note::
565
+ The unload function is deprecated from version 3.8.0 onwards and is a
566
+ no-op from version 3.9.0 onwards. It should no longer be used, as it
567
+ may be removed in a future version of ArangoDB.
568
+
556
569
  :return: True if collection was unloaded successfully.
557
570
  :rtype: bool
558
571
  :raise arango.exceptions.CollectionUnloadError: If operation fails.
559
572
  """
573
+ m = "The unload function is deprecated from version 3.8.0 onwards and is a no-op from version 3.9.0 onwards." # noqa: E501
574
+ warn(m, DeprecationWarning, stacklevel=2)
575
+
560
576
  request = Request(method="put", endpoint=f"/_api/collection/{self.name}/unload")
561
577
 
562
578
  def response_handler(resp: Response) -> bool:
@@ -27,6 +27,7 @@ from arango.exceptions import (
27
27
  AsyncJobListError,
28
28
  CollectionCreateError,
29
29
  CollectionDeleteError,
30
+ CollectionKeyGeneratorsError,
30
31
  CollectionListError,
31
32
  DatabaseCompactError,
32
33
  DatabaseCreateError,
@@ -43,7 +44,9 @@ from arango.exceptions import (
43
44
  PermissionListError,
44
45
  PermissionResetError,
45
46
  PermissionUpdateError,
47
+ ServerAPICallsError,
46
48
  ServerAvailableOptionsGetError,
49
+ ServerCheckAvailabilityError,
47
50
  ServerCurrentOptionsGetError,
48
51
  ServerDetailsError,
49
52
  ServerEchoError,
@@ -444,7 +447,7 @@ class Database(ApiGroup):
444
447
  :type force: bool
445
448
  :return: Server license.
446
449
  :rtype: dict
447
- :raise arango.exceptions.ServerLicenseError: If retrieval fails.
450
+ :raise arango.exceptions.ServerLicenseSetError: If retrieval fails.
448
451
  """
449
452
  request = Request(
450
453
  method="put",
@@ -461,6 +464,26 @@ class Database(ApiGroup):
461
464
 
462
465
  return self._execute(request, response_handler)
463
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
+
464
487
  def status(self) -> Result[Json]:
465
488
  """Return ArangoDB server status.
466
489
 
@@ -480,6 +503,25 @@ class Database(ApiGroup):
480
503
 
481
504
  return self._execute(request, response_handler)
482
505
 
506
+ def check_availability(self) -> Result[str]:
507
+ """Return ArangoDB server availability mode.
508
+
509
+ :return: Server availability mode ("readonly" or "default").
510
+ :rtype: str
511
+ :raise arango.exceptions.ServerCheckAvailabilityError: If retrieval fails.
512
+ """
513
+ request = Request(
514
+ method="get",
515
+ endpoint="/_admin/server/availability",
516
+ )
517
+
518
+ def response_handler(resp: Response) -> str:
519
+ if not resp.is_success:
520
+ raise ServerCheckAvailabilityError(resp, request)
521
+ return str(resp.body["mode"])
522
+
523
+ return self._execute(request, response_handler)
524
+
483
525
  def compact(
484
526
  self,
485
527
  change_level: Optional[bool] = None,
@@ -1068,6 +1110,7 @@ class Database(ApiGroup):
1068
1110
 
1069
1111
  :return: Server metrics in Prometheus format.
1070
1112
  :rtype: str
1113
+ :raise arango.exceptions.ServerMetricsError: If operation fails.
1071
1114
  """
1072
1115
  request = Request(method="get", endpoint="/_admin/metrics/v2")
1073
1116
 
@@ -1623,6 +1666,23 @@ class Database(ApiGroup):
1623
1666
 
1624
1667
  return self._execute(request, response_handler)
1625
1668
 
1669
+ def key_generators(self) -> Result[List[str]]:
1670
+ """Returns the available key generators for collections.
1671
+
1672
+ :return: List of available key generators.
1673
+ :rtype: [str]
1674
+ :raise arango.exceptions.CollectionKeyGeneratorsError: If retrieval fails.
1675
+ """ # noqa: E501
1676
+ request = Request(method="get", endpoint="/_api/key-generators")
1677
+
1678
+ def response_handler(resp: Response) -> List[str]:
1679
+ if not resp.is_success:
1680
+ raise CollectionKeyGeneratorsError(resp, request)
1681
+ result: List[str] = resp.body["keyGenerators"]
1682
+ return result
1683
+
1684
+ return self._execute(request, response_handler)
1685
+
1626
1686
  ####################
1627
1687
  # Graph Management #
1628
1688
  ####################
@@ -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
 
@@ -298,6 +302,10 @@ class CollectionTruncateError(ArangoServerError):
298
302
  """Failed to truncate collection."""
299
303
 
300
304
 
305
+ class CollectionKeyGeneratorsError(ArangoServerError):
306
+ """Failed to retrieve key generators."""
307
+
308
+
301
309
  class CollectionLoadError(ArangoServerError):
302
310
  """Failed to load collection."""
303
311
 
@@ -634,6 +642,10 @@ class ServerDetailsError(ArangoServerError):
634
642
  """Failed to retrieve server details."""
635
643
 
636
644
 
645
+ class ServerAPICallsError(ArangoServerError):
646
+ """Failed to retrieve recent API calls."""
647
+
648
+
637
649
  class ServerLicenseGetError(ArangoServerError):
638
650
  """Failed to retrieve server license."""
639
651
 
@@ -650,6 +662,10 @@ class ServerTimeError(ArangoServerError):
650
662
  """Failed to retrieve server system time."""
651
663
 
652
664
 
665
+ class ServerCheckAvailabilityError(ArangoServerError):
666
+ """Failed to retrieve server availability mode."""
667
+
668
+
653
669
  class ServerEchoError(ArangoServerError):
654
670
  """Failed to retrieve details on last request."""
655
671
 
@@ -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.1"
15
+ driver_version = "8.2.3"
16
16
  driver_header = "python-arango/" + driver_version + " (" + flags + ")"
17
17
  normalized_headers: Headers = {
18
18
  "charset": "utf-8",
@@ -83,9 +83,9 @@ information, refer to `ArangoDB manual`_.
83
83
  foxx.readme(service_mount)
84
84
  foxx.swagger(service_mount)
85
85
  foxx.download(service_mount)
86
- foxx.commit(service_mount)
86
+ foxx.commit()
87
87
  foxx.scripts(service_mount)
88
- foxx.run_script(service_mount, 'setup', [])
88
+ foxx.run_script(service_mount, 'setup', {})
89
89
  foxx.run_tests(service_mount, reporter='xunit', output_format='xml')
90
90
 
91
91
  # Delete a service.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.2.1
3
+ Version: 8.2.3
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>
@@ -8,8 +8,8 @@
8
8
  # Example:
9
9
  # ./starter.sh cluster enterprise 3.12.5
10
10
 
11
- setup="${1:-single}"
12
- license="${2:-community}"
11
+ setup="${1:-cluster}"
12
+ license="${2:-enterprise}"
13
13
  version="${3:-latest}"
14
14
 
15
15
  extra_ports=""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes