python-arango 8.3.1__tar.gz → 8.3.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 (94) hide show
  1. {python_arango-8.3.1 → python_arango-8.3.3}/.circleci/config.yml +21 -5
  2. {python_arango-8.3.1 → python_arango-8.3.3}/.github/workflows/pypi.yaml +2 -2
  3. {python_arango-8.3.1 → python_arango-8.3.3}/PKG-INFO +2 -2
  4. {python_arango-8.3.1 → python_arango-8.3.3}/README.md +1 -1
  5. {python_arango-8.3.1 → python_arango-8.3.3}/arango/aql.py +6 -0
  6. {python_arango-8.3.1 → python_arango-8.3.3}/arango/cluster.py +5 -0
  7. {python_arango-8.3.1 → python_arango-8.3.3}/arango/collection.py +21 -149
  8. {python_arango-8.3.1 → python_arango-8.3.3}/arango/database.py +29 -2
  9. {python_arango-8.3.1 → python_arango-8.3.3}/arango/formatter.py +7 -0
  10. {python_arango-8.3.1 → python_arango-8.3.3}/arango/foxx.py +4 -1
  11. {python_arango-8.3.1 → python_arango-8.3.3}/arango/replication.py +4 -0
  12. python_arango-8.3.3/arango/version.py +1 -0
  13. {python_arango-8.3.1 → python_arango-8.3.3}/arango/wal.py +15 -3
  14. {python_arango-8.3.1 → python_arango-8.3.3}/docs/aql.rst +4 -0
  15. {python_arango-8.3.1 → python_arango-8.3.3}/docs/cluster.rst +0 -1
  16. {python_arango-8.3.1 → python_arango-8.3.3}/docs/collection.rst +0 -2
  17. {python_arango-8.3.1 → python_arango-8.3.3}/docs/foxx.rst +4 -0
  18. {python_arango-8.3.1 → python_arango-8.3.3}/docs/graph.rst +1 -1
  19. {python_arango-8.3.1 → python_arango-8.3.3}/docs/simple.rst +0 -3
  20. {python_arango-8.3.1 → python_arango-8.3.3}/docs/task.rst +4 -0
  21. {python_arango-8.3.1 → python_arango-8.3.3}/python_arango.egg-info/PKG-INFO +2 -2
  22. python_arango-8.3.3/starter.sh +84 -0
  23. python_arango-8.3.1/arango/version.py +0 -1
  24. python_arango-8.3.1/starter.sh +0 -60
  25. {python_arango-8.3.1 → python_arango-8.3.3}/.github/workflows/codeql.yaml +0 -0
  26. {python_arango-8.3.1 → python_arango-8.3.3}/.github/workflows/docs.yaml +0 -0
  27. {python_arango-8.3.1 → python_arango-8.3.3}/.gitignore +0 -0
  28. {python_arango-8.3.1 → python_arango-8.3.3}/.pre-commit-config.yaml +0 -0
  29. {python_arango-8.3.1 → python_arango-8.3.3}/.readthedocs.yaml +0 -0
  30. {python_arango-8.3.1 → python_arango-8.3.3}/CONTRIBUTING.md +0 -0
  31. {python_arango-8.3.1 → python_arango-8.3.3}/LICENSE +0 -0
  32. {python_arango-8.3.1 → python_arango-8.3.3}/MANIFEST.in +0 -0
  33. {python_arango-8.3.1 → python_arango-8.3.3}/arango/__init__.py +0 -0
  34. {python_arango-8.3.1 → python_arango-8.3.3}/arango/api.py +0 -0
  35. {python_arango-8.3.1 → python_arango-8.3.3}/arango/backup.py +0 -0
  36. {python_arango-8.3.1 → python_arango-8.3.3}/arango/client.py +0 -0
  37. {python_arango-8.3.1 → python_arango-8.3.3}/arango/connection.py +0 -0
  38. {python_arango-8.3.1 → python_arango-8.3.3}/arango/cursor.py +0 -0
  39. {python_arango-8.3.1 → python_arango-8.3.3}/arango/errno.py +0 -0
  40. {python_arango-8.3.1 → python_arango-8.3.3}/arango/exceptions.py +0 -0
  41. {python_arango-8.3.1 → python_arango-8.3.3}/arango/executor.py +0 -0
  42. {python_arango-8.3.1 → python_arango-8.3.3}/arango/graph.py +0 -0
  43. {python_arango-8.3.1 → python_arango-8.3.3}/arango/http.py +0 -0
  44. {python_arango-8.3.1 → python_arango-8.3.3}/arango/job.py +0 -0
  45. {python_arango-8.3.1 → python_arango-8.3.3}/arango/pregel.py +0 -0
  46. {python_arango-8.3.1 → python_arango-8.3.3}/arango/py.typed +0 -0
  47. {python_arango-8.3.1 → python_arango-8.3.3}/arango/request.py +0 -0
  48. {python_arango-8.3.1 → python_arango-8.3.3}/arango/resolver.py +0 -0
  49. {python_arango-8.3.1 → python_arango-8.3.3}/arango/response.py +0 -0
  50. {python_arango-8.3.1 → python_arango-8.3.3}/arango/result.py +0 -0
  51. {python_arango-8.3.1 → python_arango-8.3.3}/arango/typings.py +0 -0
  52. {python_arango-8.3.1 → python_arango-8.3.3}/arango/utils.py +0 -0
  53. {python_arango-8.3.1 → python_arango-8.3.3}/docs/Makefile +0 -0
  54. {python_arango-8.3.1 → python_arango-8.3.3}/docs/admin.rst +0 -0
  55. {python_arango-8.3.1 → python_arango-8.3.3}/docs/analyzer.rst +0 -0
  56. {python_arango-8.3.1 → python_arango-8.3.3}/docs/async.rst +0 -0
  57. {python_arango-8.3.1 → python_arango-8.3.3}/docs/auth.rst +0 -0
  58. {python_arango-8.3.1 → python_arango-8.3.3}/docs/backup.rst +0 -0
  59. {python_arango-8.3.1 → python_arango-8.3.3}/docs/batch.rst +0 -0
  60. {python_arango-8.3.1 → python_arango-8.3.3}/docs/certificates.rst +0 -0
  61. {python_arango-8.3.1 → python_arango-8.3.3}/docs/compression.rst +0 -0
  62. {python_arango-8.3.1 → python_arango-8.3.3}/docs/conf.py +0 -0
  63. {python_arango-8.3.1 → python_arango-8.3.3}/docs/contributing.rst +0 -0
  64. {python_arango-8.3.1 → python_arango-8.3.3}/docs/cursor.rst +0 -0
  65. {python_arango-8.3.1 → python_arango-8.3.3}/docs/database.rst +0 -0
  66. {python_arango-8.3.1 → python_arango-8.3.3}/docs/document.rst +0 -0
  67. {python_arango-8.3.1 → python_arango-8.3.3}/docs/errno.rst +0 -0
  68. {python_arango-8.3.1 → python_arango-8.3.3}/docs/errors.rst +0 -0
  69. {python_arango-8.3.1 → python_arango-8.3.3}/docs/http.rst +0 -0
  70. {python_arango-8.3.1 → python_arango-8.3.3}/docs/index.rst +0 -0
  71. {python_arango-8.3.1 → python_arango-8.3.3}/docs/indexes.rst +0 -0
  72. {python_arango-8.3.1 → python_arango-8.3.3}/docs/logging.rst +0 -0
  73. {python_arango-8.3.1 → python_arango-8.3.3}/docs/make.bat +0 -0
  74. {python_arango-8.3.1 → python_arango-8.3.3}/docs/overload.rst +0 -0
  75. {python_arango-8.3.1 → python_arango-8.3.3}/docs/overview.rst +0 -0
  76. {python_arango-8.3.1 → python_arango-8.3.3}/docs/pregel.rst +0 -0
  77. {python_arango-8.3.1 → python_arango-8.3.3}/docs/replication.rst +0 -0
  78. {python_arango-8.3.1 → python_arango-8.3.3}/docs/requirements.txt +0 -0
  79. {python_arango-8.3.1 → python_arango-8.3.3}/docs/schema.rst +0 -0
  80. {python_arango-8.3.1 → python_arango-8.3.3}/docs/serializer.rst +0 -0
  81. {python_arango-8.3.1 → python_arango-8.3.3}/docs/specs.rst +0 -0
  82. {python_arango-8.3.1 → python_arango-8.3.3}/docs/static/logo.png +0 -0
  83. {python_arango-8.3.1 → python_arango-8.3.3}/docs/threading.rst +0 -0
  84. {python_arango-8.3.1 → python_arango-8.3.3}/docs/transaction.rst +0 -0
  85. {python_arango-8.3.1 → python_arango-8.3.3}/docs/user.rst +0 -0
  86. {python_arango-8.3.1 → python_arango-8.3.3}/docs/view.rst +0 -0
  87. {python_arango-8.3.1 → python_arango-8.3.3}/docs/wal.rst +0 -0
  88. {python_arango-8.3.1 → python_arango-8.3.3}/pyproject.toml +0 -0
  89. {python_arango-8.3.1 → python_arango-8.3.3}/python_arango.egg-info/SOURCES.txt +0 -0
  90. {python_arango-8.3.1 → python_arango-8.3.3}/python_arango.egg-info/dependency_links.txt +0 -0
  91. {python_arango-8.3.1 → python_arango-8.3.3}/python_arango.egg-info/requires.txt +0 -0
  92. {python_arango-8.3.1 → python_arango-8.3.3}/python_arango.egg-info/top_level.txt +0 -0
  93. {python_arango-8.3.1 → python_arango-8.3.3}/setup.cfg +0 -0
  94. {python_arango-8.3.1 → python_arango-8.3.3}/setup.py +0 -0
@@ -4,7 +4,7 @@ executors:
4
4
  python-container:
5
5
  docker:
6
6
  - image: cimg/python:3.12
7
- resource_class: small
7
+ resource_class: arangodb/small-amd64
8
8
  python-vm:
9
9
  machine:
10
10
  image: ubuntu-2404:current
@@ -15,18 +15,34 @@ workflows:
15
15
  jobs:
16
16
  - lint
17
17
  - test:
18
- name: Python (<< matrix.python_version >>) - ArangoDB (<< matrix.arangodb_license >>, << matrix.arangodb_version >> << matrix.arangodb_config >>)
18
+ name: Python (<< matrix.python_version >>) - ArangoDB (enterprise, << matrix.arangodb_version >> << matrix.arangodb_config >>)
19
19
  matrix:
20
20
  parameters:
21
- python_version: ["3.10", "3.11", "3.12"]
21
+ python_version: ["3.13"]
22
22
  arangodb_config: ["single", "cluster"]
23
23
  arangodb_license: ["enterprise"]
24
24
  arangodb_version: ["3.12"]
25
+ - test:
26
+ name: Python (<< matrix.python_version >>) - ArangoDB (enterprise-preview, << matrix.arangodb_version >> << matrix.arangodb_config >>)
27
+ matrix:
28
+ parameters:
29
+ python_version: ["3.13"]
30
+ arangodb_config: ["single", "cluster"]
31
+ arangodb_license: ["enterprise-preview"]
32
+ arangodb_version: ["4.0-nightly"]
33
+ - test:
34
+ name: Python (<< matrix.python_version >>) - ArangoDB (enterprise, 3.12 cluster)
35
+ matrix:
36
+ parameters:
37
+ python_version: ["3.10", "3.11", "3.12"]
38
+ arangodb_config: ["cluster"]
39
+ arangodb_license: ["enterprise"]
40
+ arangodb_version: ["3.12"]
25
41
 
26
42
  jobs:
27
43
  lint:
28
44
  executor: python-container
29
- resource_class: small
45
+ resource_class: arangodb/small-amd64
30
46
  steps:
31
47
  - checkout
32
48
  - run:
@@ -86,7 +102,7 @@ jobs:
86
102
  args+=("--cluster" "--port=8539" "--port=8549")
87
103
  fi
88
104
 
89
- if [ << parameters.arangodb_license >> != "enterprise" ]; then
105
+ if [ << parameters.arangodb_license >> != "enterprise" ] && [ << parameters.arangodb_license >> != "enterprise-preview" ]; then
90
106
  args+=("--skip" "enterprise")
91
107
  fi
92
108
 
@@ -43,10 +43,10 @@ jobs:
43
43
  env:
44
44
  TWINE_USERNAME: __token__
45
45
  TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
46
- run: twine upload --repository testpypi dist/*
46
+ run: twine upload --verbose --repository testpypi dist/*
47
47
 
48
48
  - name: Publish to PyPI
49
49
  env:
50
50
  TWINE_USERNAME: __token__
51
51
  TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
52
- run: twine upload --repository pypi dist/*
52
+ run: twine upload --verbose --repository pypi dist/*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.3.1
3
+ Version: 8.3.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>
@@ -183,7 +183,7 @@ edges.insert({"_from": "students/03", "_to": "lectures/CSC101"})
183
183
  # Traverse the graph in outbound direction, breath-first.
184
184
  query = """
185
185
  FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'
186
- OPTIONS { bfs: true, uniqueVertices: 'global' }
186
+ OPTIONS { order: 'bfs', uniqueVertices: 'global' }
187
187
  RETURN {vertex: v, edge: e, path: p}
188
188
  """
189
189
  cursor = db.aql.execute(query)
@@ -118,7 +118,7 @@ edges.insert({"_from": "students/03", "_to": "lectures/CSC101"})
118
118
  # Traverse the graph in outbound direction, breath-first.
119
119
  query = """
120
120
  FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'
121
- OPTIONS { bfs: true, uniqueVertices: 'global' }
121
+ OPTIONS { order: 'bfs', uniqueVertices: 'global' }
122
122
  RETURN {vertex: v, edge: e, path: p}
123
123
  """
124
124
  cursor = db.aql.execute(query)
@@ -654,6 +654,8 @@ class AQL(ApiGroup):
654
654
  def functions(self) -> Result[Jsons]:
655
655
  """List the AQL functions defined in the database.
656
656
 
657
+ .. warning:: AQL User Functions are no longer available in ArangoDB 4.0.
658
+
657
659
  :return: AQL functions.
658
660
  :rtype: [dict]
659
661
  :raise arango.exceptions.AQLFunctionListError: If retrieval fails.
@@ -676,6 +678,8 @@ class AQL(ApiGroup):
676
678
  def create_function(self, name: str, code: str) -> Result[Json]:
677
679
  """Create a new AQL function.
678
680
 
681
+ .. warning:: AQL User Functions are no longer available in ArangoDB 4.0.
682
+
679
683
  :param name: AQL function name.
680
684
  :type name: str
681
685
  :param code: Function definition in Javascript.
@@ -703,6 +707,8 @@ class AQL(ApiGroup):
703
707
  ) -> Result[Union[bool, Json]]:
704
708
  """Delete an AQL function.
705
709
 
710
+ .. warning:: AQL User Functions are no longer available in ArangoDB 4.0.
711
+
706
712
  :param name: AQL function name.
707
713
  :type name: str
708
714
  :param group: If set to True, value of parameter **name** is treated
@@ -144,6 +144,11 @@ class Cluster(ApiGroup): # pragma: no cover
144
144
  def server_statistics(self, server_id: str) -> Result[Json]:
145
145
  """Return the statistics for the given server.
146
146
 
147
+ .. warning::
148
+ DB Server Statistics are no longer available in ArangoDB 4.0.
149
+ Use :meth:`Database.metrics <arango.database.StandardDatabase.metrics>`
150
+ instead.
151
+
147
152
  :param server_id: Server ID.
148
153
  :type server_id: str
149
154
  :return: Statistics for the given server.
@@ -542,7 +542,7 @@ class Collection(ApiGroup):
542
542
  .. note::
543
543
  The load function is deprecated from version 3.8.0 onwards and is a
544
544
  no-op from version 3.9.0 onwards. It should no longer be used, as it
545
- may be removed in a future version of ArangoDB.
545
+ is removed from ArangoDB 4.0.
546
546
 
547
547
  :return: True if collection was loaded successfully.
548
548
  :rtype: bool
@@ -566,7 +566,7 @@ class Collection(ApiGroup):
566
566
  .. note::
567
567
  The unload function is deprecated from version 3.8.0 onwards and is a
568
568
  no-op from version 3.9.0 onwards. It should no longer be used, as it
569
- may be removed in a future version of ArangoDB.
569
+ is removed from ArangoDB 4.0.
570
570
 
571
571
  :return: True if collection was unloaded successfully.
572
572
  :rtype: bool
@@ -849,6 +849,8 @@ class Collection(ApiGroup):
849
849
  ) -> Result[Cursor]:
850
850
  """Return documents near a given coordinate.
851
851
 
852
+ .. warning:: This functionality is deprecated in ArangoDB 4.0.
853
+
852
854
  Documents returned are sorted according to distance, with the nearest
853
855
  document being the first. If there are documents of equal distance,
854
856
  they are randomly chosen from the set until the limit is reached. A geo
@@ -866,6 +868,9 @@ class Collection(ApiGroup):
866
868
  :rtype: arango.cursor.Cursor
867
869
  :raises arango.exceptions.DocumentGetError: If retrieval fails.
868
870
  """
871
+ m = "find_near is deprecated in ArangoDB 4.0"
872
+ warn(m, DeprecationWarning, stacklevel=2)
873
+
869
874
  assert isinstance(latitude, Number), "latitude must be a number"
870
875
  assert isinstance(longitude, Number), "longitude must be a number"
871
876
  assert is_none_or_int(limit), "limit must be a non-negative int"
@@ -971,6 +976,8 @@ class Collection(ApiGroup):
971
976
  ) -> Result[Cursor]:
972
977
  """Return documents within a given radius around a coordinate.
973
978
 
979
+ .. warning:: This functionality is deprecated in ArangoDB 4.0.
980
+
974
981
  A geo index must be defined in the collection to use this method.
975
982
 
976
983
  :param latitude: Latitude.
@@ -988,6 +995,9 @@ class Collection(ApiGroup):
988
995
  :rtype: arango.cursor.Cursor
989
996
  :raises arango.exceptions.DocumentGetError: If retrieval fails.
990
997
  """
998
+ m = "find_in_radius is deprecated in ArangoDB 4.0"
999
+ warn(m, DeprecationWarning, stacklevel=2)
1000
+
991
1001
  assert isinstance(latitude, Number), "latitude must be a number"
992
1002
  assert isinstance(longitude, Number), "longitude must be a number"
993
1003
  assert isinstance(radius, Number), "radius must be a number"
@@ -1141,6 +1151,11 @@ class Collection(ApiGroup):
1141
1151
  ) -> Result[Cursor]:
1142
1152
  """Return documents that match the given fulltext query.
1143
1153
 
1154
+ .. warning::
1155
+
1156
+ Fulltext indexes are no longer supported and have been replaced
1157
+ by ArangoSearch (inverted indexes).
1158
+
1144
1159
  :param field: Document field with fulltext index.
1145
1160
  :type field: str
1146
1161
  :param query: Fulltext query.
@@ -1335,112 +1350,6 @@ class Collection(ApiGroup):
1335
1350
 
1336
1351
  return self._execute(request, response_handler)
1337
1352
 
1338
- def add_hash_index(
1339
- self,
1340
- fields: Sequence[str],
1341
- unique: Optional[bool] = None,
1342
- sparse: Optional[bool] = None,
1343
- deduplicate: Optional[bool] = None,
1344
- name: Optional[str] = None,
1345
- in_background: Optional[bool] = None,
1346
- ) -> Result[Json]:
1347
- """Create a new hash index.
1348
-
1349
- .. warning::
1350
-
1351
- The index types `hash` and `skiplist` are aliases for the persistent
1352
- index type and should no longer be used to create new indexes. The
1353
- aliases will be removed in a future version.
1354
-
1355
- :param fields: Document fields to index.
1356
- :type fields: [str]
1357
- :param unique: Whether the index is unique.
1358
- :type unique: bool | None
1359
- :param sparse: If set to True, documents with None in the field
1360
- are also indexed. If set to False, they are skipped.
1361
- :type sparse: bool | None
1362
- :param deduplicate: If set to True, inserting duplicate index values
1363
- from the same document triggers unique constraint errors.
1364
- :type deduplicate: bool | None
1365
- :param name: Optional name for the index.
1366
- :type name: str | None
1367
- :param in_background: Do not hold the collection lock.
1368
- :type in_background: bool | None
1369
- :return: New index details.
1370
- :rtype: dict
1371
- :raise arango.exceptions.IndexCreateError: If create fails.
1372
- """
1373
- m = "add_hash_index is deprecated. Using add_index with {'type': 'hash'} instead." # noqa: E501
1374
- warn(m, DeprecationWarning, stacklevel=2)
1375
-
1376
- data: Json = {"type": "hash", "fields": fields}
1377
-
1378
- if unique is not None:
1379
- data["unique"] = unique
1380
- if sparse is not None:
1381
- data["sparse"] = sparse
1382
- if deduplicate is not None:
1383
- data["deduplicate"] = deduplicate
1384
- if name is not None:
1385
- data["name"] = name
1386
- if in_background is not None:
1387
- data["inBackground"] = in_background
1388
-
1389
- return self.add_index(data, formatter=True)
1390
-
1391
- def add_skiplist_index(
1392
- self,
1393
- fields: Sequence[str],
1394
- unique: Optional[bool] = None,
1395
- sparse: Optional[bool] = None,
1396
- deduplicate: Optional[bool] = None,
1397
- name: Optional[str] = None,
1398
- in_background: Optional[bool] = None,
1399
- ) -> Result[Json]:
1400
- """Create a new skiplist index.
1401
-
1402
- .. warning::
1403
-
1404
- The index types `hash` and `skiplist` are aliases for the persistent
1405
- index type and should no longer be used to create new indexes. The
1406
- aliases will be removed in a future version.
1407
-
1408
- :param fields: Document fields to index.
1409
- :type fields: [str]
1410
- :param unique: Whether the index is unique.
1411
- :type unique: bool | None
1412
- :param sparse: If set to True, documents with None in the field
1413
- are also indexed. If set to False, they are skipped.
1414
- :type sparse: bool | None
1415
- :param deduplicate: If set to True, inserting duplicate index values
1416
- from the same document triggers unique constraint errors.
1417
- :type deduplicate: bool | None
1418
- :param name: Optional name for the index.
1419
- :type name: str | None
1420
- :param in_background: Do not hold the collection lock.
1421
- :type in_background: bool | None
1422
- :return: New index details.
1423
- :rtype: dict
1424
- :raise arango.exceptions.IndexCreateError: If create fails.
1425
- """
1426
- m = "add_skiplist_index is deprecated. Using add_index with {'type': 'skiplist'} instead." # noqa: E501
1427
- warn(m, DeprecationWarning, stacklevel=2)
1428
-
1429
- data: Json = {"type": "skiplist", "fields": fields}
1430
-
1431
- if unique is not None:
1432
- data["unique"] = unique
1433
- if sparse is not None:
1434
- data["sparse"] = sparse
1435
- if deduplicate is not None:
1436
- data["deduplicate"] = deduplicate
1437
- if name is not None:
1438
- data["name"] = name
1439
- if in_background is not None:
1440
- data["inBackground"] = in_background
1441
-
1442
- return self.add_index(data, formatter=True)
1443
-
1444
1353
  def add_geo_index(
1445
1354
  self,
1446
1355
  fields: Fields,
@@ -1487,45 +1396,6 @@ class Collection(ApiGroup):
1487
1396
 
1488
1397
  return self.add_index(data, formatter=True)
1489
1398
 
1490
- def add_fulltext_index(
1491
- self,
1492
- fields: Sequence[str],
1493
- min_length: Optional[int] = None,
1494
- name: Optional[str] = None,
1495
- in_background: Optional[bool] = None,
1496
- ) -> Result[Json]:
1497
- """Create a new fulltext index.
1498
-
1499
- .. warning::
1500
- This method is deprecated since ArangoDB 3.10 and will be removed
1501
- in a future version of the driver.
1502
-
1503
- :param fields: Document fields to index.
1504
- :type fields: [str]
1505
- :param min_length: Minimum number of characters to index.
1506
- :type min_length: int | None
1507
- :param name: Optional name for the index.
1508
- :type name: str | None
1509
- :param in_background: Do not hold the collection lock.
1510
- :type in_background: bool | None
1511
- :return: New index details.
1512
- :rtype: dict
1513
- :raise arango.exceptions.IndexCreateError: If create fails.
1514
- """
1515
- m = "add_fulltext_index is deprecated. Using add_index with {'type': 'fulltext'} instead." # noqa: E501
1516
- warn(m, DeprecationWarning, stacklevel=2)
1517
-
1518
- data: Json = {"type": "fulltext", "fields": fields}
1519
-
1520
- if min_length is not None:
1521
- data["minLength"] = min_length
1522
- if name is not None:
1523
- data["name"] = name
1524
- if in_background is not None:
1525
- data["inBackground"] = in_background
1526
-
1527
- return self.add_index(data, formatter=True)
1528
-
1529
1399
  def add_persistent_index(
1530
1400
  self,
1531
1401
  fields: Sequence[str],
@@ -1790,7 +1660,8 @@ class Collection(ApiGroup):
1790
1660
  can be used to save resources.
1791
1661
  :type silent: bool
1792
1662
  :param overwrite: If set to True, operation does not fail on duplicate
1793
- keys and the existing documents are replaced.
1663
+ keys and the existing documents are replaced. **Removed** in ArangoDB
1664
+ v4.0.0. Use overwrite_mode instead.
1794
1665
  :type overwrite: bool
1795
1666
  :param return_old: Include body of the old documents if replaced.
1796
1667
  Applies only when value of **overwrite** is set to True.
@@ -2611,7 +2482,8 @@ class StandardCollection(Collection):
2611
2482
  can be used to save resources.
2612
2483
  :type silent: bool
2613
2484
  :param overwrite: If set to True, operation does not fail on duplicate
2614
- key and existing document is overwritten (replace-insert).
2485
+ key and existing document is overwritten (replace-insert). **Removed**
2486
+ in ArangoDB v4.0.0. Use overwrite_mode instead.
2615
2487
  :type overwrite: bool
2616
2488
  :param return_old: Include body of the old document if overwritten.
2617
2489
  Ignored if parameter **silent** is set to True.
@@ -181,6 +181,8 @@ class Database(ApiGroup):
181
181
  def foxx(self) -> Foxx:
182
182
  """Return Foxx API wrapper.
183
183
 
184
+ .. warning:: Foxx microservice features are no longer available in ArangoDB 4.0.
185
+
184
186
  :return: Foxx API wrapper.
185
187
  :rtype: arango.foxx.Foxx
186
188
  """
@@ -244,6 +246,10 @@ class Database(ApiGroup):
244
246
  def execute(self, command: str) -> Result[Any]:
245
247
  """Execute raw Javascript command on the server.
246
248
 
249
+ .. warning::
250
+
251
+ Javascript command execution is no longer available in ArangoDB 4.0.
252
+
247
253
  Executes the JavaScript code in the body on the server as
248
254
  the body of a function with no arguments. If you have a
249
255
  return statement then the return value you produce will be returned
@@ -569,10 +575,15 @@ class Database(ApiGroup):
569
575
  def required_db_version(self) -> Result[str]:
570
576
  """Return required version of target database.
571
577
 
578
+ .. warning:: Required version endpoint is no longer available in ArangoDB 4.0.
579
+
572
580
  :return: Required version of target database.
573
581
  :rtype: str
574
582
  :raise arango.exceptions.ServerRequiredDBVersionError: If retrieval fails.
575
583
  """
584
+ m = "target-version is removed in ArangoDB 4.0"
585
+ warn(m, DeprecationWarning, stacklevel=2)
586
+
576
587
  request = Request(method="get", endpoint="/_admin/database/target-version")
577
588
 
578
589
  def response_handler(resp: Response) -> str:
@@ -601,6 +612,11 @@ class Database(ApiGroup):
601
612
  def statistics(self, description: bool = False) -> Result[Json]:
602
613
  """Return server statistics.
603
614
 
615
+ .. warning::
616
+ Server Statistics are no longer available in ArangoDB 4.0.
617
+ Use :meth:`Database.metrics <arango.database.StandardDatabase.metrics>`
618
+ instead.
619
+
604
620
  :return: Server statistics.
605
621
  :rtype: dict
606
622
  :raise arango.exceptions.ServerStatisticsError: If retrieval fails.
@@ -707,6 +723,8 @@ class Database(ApiGroup):
707
723
  """Return details of the last request (e.g. headers, payload),
708
724
  or echo the given request body.
709
725
 
726
+ .. warning:: Request echoing is no longer available in ArangoDB 4.0.
727
+
710
728
  :param body: The body of the request. Can be of any type
711
729
  and is simply forwarded. If not set, the details of the last
712
730
  request are returned.
@@ -1095,6 +1113,8 @@ class Database(ApiGroup):
1095
1113
  def reload_routing(self) -> Result[bool]:
1096
1114
  """Reload the routing information.
1097
1115
 
1116
+ .. warning:: Route reloading is no longer available in ArangoDB 4.0.
1117
+
1098
1118
  :return: True if routing was reloaded successfully.
1099
1119
  :rtype: bool
1100
1120
  :raise arango.exceptions.ServerReloadRoutingError: If reload fails.
@@ -1115,7 +1135,7 @@ class Database(ApiGroup):
1115
1135
  :rtype: str
1116
1136
  :raise arango.exceptions.ServerMetricsError: If operation fails.
1117
1137
  """
1118
- request = Request(method="get", endpoint="/_admin/metrics/v2")
1138
+ request = Request(method="get", endpoint="/_admin/metrics")
1119
1139
 
1120
1140
  def response_handler(resp: Response) -> str:
1121
1141
  if resp.is_success:
@@ -1554,7 +1574,6 @@ class Database(ApiGroup):
1554
1574
  "name": col["name"],
1555
1575
  "system": col["isSystem"],
1556
1576
  "type": StandardCollection.types[col["type"]],
1557
- "status": StandardCollection.statuses[col["status"]],
1558
1577
  }
1559
1578
  for col in resp.body["result"]
1560
1579
  ]
@@ -2269,6 +2288,8 @@ class Database(ApiGroup):
2269
2288
  def tasks(self) -> Result[Jsons]:
2270
2289
  """Return all currently active server tasks.
2271
2290
 
2291
+ .. warning:: Tasks are no longer available in ArangoDB 4.0.
2292
+
2272
2293
  :return: Currently active server tasks.
2273
2294
  :rtype: [dict]
2274
2295
  :raise arango.exceptions.TaskListError: If retrieval fails.
@@ -2286,6 +2307,8 @@ class Database(ApiGroup):
2286
2307
  def task(self, task_id: str) -> Result[Json]:
2287
2308
  """Return the details of an active server task.
2288
2309
 
2310
+ .. warning:: Tasks are no longer available in ArangoDB 4.0.
2311
+
2289
2312
  :param task_id: Server task ID.
2290
2313
  :type task_id: str
2291
2314
  :return: Server task details.
@@ -2312,6 +2335,8 @@ class Database(ApiGroup):
2312
2335
  ) -> Result[Json]:
2313
2336
  """Create a new server task.
2314
2337
 
2338
+ .. warning:: Tasks are no longer available in ArangoDB 4.0.
2339
+
2315
2340
  :param name: Name of the server task.
2316
2341
  :type name: str
2317
2342
  :param command: Javascript command to execute.
@@ -2355,6 +2380,8 @@ class Database(ApiGroup):
2355
2380
  def delete_task(self, task_id: str, ignore_missing: bool = False) -> Result[bool]:
2356
2381
  """Delete a server task.
2357
2382
 
2383
+ .. warning:: Tasks are no longer available in ArangoDB 4.0.
2384
+
2358
2385
  :param task_id: Server task ID.
2359
2386
  :type task_id: str
2360
2387
  :param ignore_missing: Do not raise an exception on missing task.
@@ -119,6 +119,10 @@ def format_index(body: Json, formatter: bool = True) -> Json:
119
119
  # Introduced via Vector Index in 3.12.6
120
120
  if "params" in body:
121
121
  result["params"] = body["params"]
122
+ if "errorMessage" in body:
123
+ result["error_message"] = body["errorMessage"]
124
+ if "trainingState" in body:
125
+ result["training_state"] = body["trainingState"]
122
126
 
123
127
  return verify_format(body, result)
124
128
 
@@ -275,6 +279,9 @@ def format_collection(body: Json) -> Json:
275
279
  if "internalValidatorType" in body:
276
280
  result["internal_validator_type"] = body["internalValidatorType"]
277
281
 
282
+ if "supportsRBAC" in body:
283
+ result["supportsRBAC"] = body["supportsRBAC"]
284
+
278
285
  return verify_format(body, result)
279
286
 
280
287
 
@@ -37,7 +37,10 @@ from arango.typings import Json, Jsons, Params
37
37
 
38
38
 
39
39
  class Foxx(ApiGroup):
40
- """Foxx API wrapper."""
40
+ """Foxx API wrapper.
41
+
42
+ .. warning:: Foxx microservice features are no longer available in ArangoDB 4.0.
43
+ """
41
44
 
42
45
  def __repr__(self) -> str:
43
46
  return f"<Foxx in {self._conn.db_name}>"
@@ -1,6 +1,7 @@
1
1
  __all__ = ["Replication"]
2
2
 
3
3
  from typing import Optional, Sequence
4
+ from warnings import warn
4
5
 
5
6
  from arango.api import ApiGroup
6
7
  from arango.exceptions import (
@@ -325,6 +326,9 @@ class Replication(ApiGroup):
325
326
  :rtype: str
326
327
  :raise arango.exceptions.ReplicationLoggerFirstTickError: If retrieval fails.
327
328
  """
329
+ m = "/_api/replication/logger-first-tick endpoint is removed in ArangoDB v4.0"
330
+ warn(m, DeprecationWarning, stacklevel=2)
331
+
328
332
  request = Request(
329
333
  method="get",
330
334
  endpoint="/_api/replication/logger-first-tick",
@@ -0,0 +1 @@
1
+ __version__ = "8.3.3"
@@ -1,6 +1,7 @@
1
1
  __all__ = ["WAL"]
2
2
 
3
3
  from typing import Optional
4
+ from warnings import warn
4
5
 
5
6
  from arango.api import ApiGroup
6
7
  from arango.exceptions import (
@@ -28,12 +29,15 @@ class WAL(ApiGroup): # pragma: no cover
28
29
  """WAL (Write-Ahead Log) API wrapper."""
29
30
 
30
31
  def properties(self) -> Result[Json]:
31
- """Return WAL properties.
32
+ """Return WAL properties. **Removed** in ArangoDB v4.0.0.
32
33
 
33
34
  :return: WAL properties.
34
35
  :rtype: dict
35
36
  :raise arango.exceptions.WALPropertiesError: If retrieval fails.
36
37
  """
38
+ m = "/_admin/wal/properties was removed in ArangoDB v4.0.0."
39
+ warn(m, DeprecationWarning, stacklevel=2)
40
+
37
41
  request = Request(method="get", endpoint="/_admin/wal/properties")
38
42
 
39
43
  def response_handler(resp: Response) -> Json:
@@ -52,7 +56,7 @@ class WAL(ApiGroup): # pragma: no cover
52
56
  throttle_wait: Optional[int] = None,
53
57
  throttle_limit: Optional[int] = None,
54
58
  ) -> Result[Json]:
55
- """Configure WAL properties.
59
+ """Configure WAL properties. **Removed in ArangoDB v4.0.0.**
56
60
 
57
61
  :param oversized_ops: If set to True, operations bigger than a single
58
62
  log file are allowed to be executed and stored.
@@ -74,6 +78,9 @@ class WAL(ApiGroup): # pragma: no cover
74
78
  :rtype: dict
75
79
  :raise arango.exceptions.WALConfigureError: If operation fails.
76
80
  """
81
+ m = "/_admin/wal/properties was removed in ArangoDB v4.0.0."
82
+ warn(m, DeprecationWarning, stacklevel=2)
83
+
77
84
  data: Json = {}
78
85
  if oversized_ops is not None:
79
86
  data["allowOversizeEntries"] = oversized_ops
@@ -98,7 +105,9 @@ class WAL(ApiGroup): # pragma: no cover
98
105
  return self._execute(request, response_handler)
99
106
 
100
107
  def transactions(self) -> Result[Json]:
101
- """Return details on currently running WAL transactions.
108
+ """**Removed** in ArangoDB v4.0.0.
109
+
110
+ Return details on currently running WAL transactions.
102
111
 
103
112
  Fields in the returned details are as follows:
104
113
 
@@ -118,6 +127,9 @@ class WAL(ApiGroup): # pragma: no cover
118
127
  :rtype: dict
119
128
  :raise arango.exceptions.WALTransactionListError: If retrieval fails.
120
129
  """
130
+ m = "/_admin/wal/transactions was removed in ArangoDB v4.0.0."
131
+ warn(m, DeprecationWarning, stacklevel=2)
132
+
121
133
  request = Request(method="get", endpoint="/_admin/wal/transactions")
122
134
 
123
135
  def response_handler(resp: Response) -> Json:
@@ -83,6 +83,10 @@ See :ref:`AQL` for API specification.
83
83
  AQL User Functions
84
84
  ==================
85
85
 
86
+ .. warning::
87
+ AQL User Functions are no longer available in ArangoDB 4.0.
88
+
89
+
86
90
  **AQL User Functions** are custom functions you define in Javascript to extend
87
91
  AQL functionality. They are somewhat similar to SQL procedures.
88
92
 
@@ -85,7 +85,6 @@ Below is an example on how to manage clusters using python-arango.
85
85
  server_id = cluster.server_id()
86
86
  cluster.server_engine(server_id)
87
87
  cluster.server_version(server_id)
88
- cluster.server_statistics(server_id)
89
88
  cluster.server_maintenance_mode(server_id)
90
89
 
91
90
  # Toggle Server maintenance mode (allowed values are "normal" and "maintenance").
@@ -43,8 +43,6 @@ Here is an example showing how you can manage standard collections:
43
43
  students.count()
44
44
 
45
45
  # Perform various operations.
46
- students.load()
47
- students.unload()
48
46
  students.truncate()
49
47
  students.configure()
50
48
 
@@ -1,6 +1,10 @@
1
1
  Foxx
2
2
  ----
3
3
 
4
+ .. warning::
5
+ Foxx microservice features are no longer available in ArangoDB 4.0.
6
+
7
+
4
8
  Python-arango provides support for **Foxx**, a microservice framework which
5
9
  lets you define custom HTTP endpoints to extend ArangoDB's REST API. For more
6
10
  information, refer to `ArangoDB manual`_.
@@ -377,7 +377,7 @@ over edges and vertices using various algorithms.
377
377
  # AQL to perform a graph traversal
378
378
  query = """
379
379
  FOR v, e, p IN 1..3 OUTBOUND 'teachers/jon' GRAPH 'school'
380
- OPTIONS { bfs: true, uniqueVertices: 'global' }
380
+ OPTIONS { order: 'bfs', uniqueVertices: 'global' }
381
381
  RETURN {vertex: v, edge: e, path: p}
382
382
  """
383
383
 
@@ -47,11 +47,8 @@ Here are all simple query (and other utility) methods available:
47
47
 
48
48
  * :func:`arango.collection.Collection.all`
49
49
  * :func:`arango.collection.Collection.find`
50
- * :func:`arango.collection.Collection.find_near`
51
50
  * :func:`arango.collection.Collection.find_in_range`
52
- * :func:`arango.collection.Collection.find_in_radius`
53
51
  * :func:`arango.collection.Collection.find_in_box`
54
- * :func:`arango.collection.Collection.find_by_text`
55
52
  * :func:`arango.collection.Collection.get_many`
56
53
  * :func:`arango.collection.Collection.ids`
57
54
  * :func:`arango.collection.Collection.keys`
@@ -1,6 +1,10 @@
1
1
  Tasks
2
2
  -----
3
3
 
4
+ .. warning::
5
+ Tasks are no longer available in ArangoDB 4.0.
6
+
7
+
4
8
  ArangoDB can schedule user-defined Javascript snippets as one-time or periodic
5
9
  (re-scheduled after each execution) tasks. Tasks are executed in the context of
6
10
  the database they are defined in.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-arango
3
- Version: 8.3.1
3
+ Version: 8.3.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>
@@ -183,7 +183,7 @@ edges.insert({"_from": "students/03", "_to": "lectures/CSC101"})
183
183
  # Traverse the graph in outbound direction, breath-first.
184
184
  query = """
185
185
  FOR v, e, p IN 1..3 OUTBOUND 'students/01' GRAPH 'school'
186
- OPTIONS { bfs: true, uniqueVertices: 'global' }
186
+ OPTIONS { order: 'bfs', uniqueVertices: 'global' }
187
187
  RETURN {vertex: v, edge: e, path: p}
188
188
  """
189
189
  cursor = db.aql.execute(query)
@@ -0,0 +1,84 @@
1
+ #!/bin/bash
2
+
3
+ # Starts a local ArangoDB server or cluster (community or enterprise).
4
+ # Useful for testing the python-arango driver against a local ArangoDB setup.
5
+
6
+ # Usage:
7
+ # ./starter.sh [single|cluster] [community|enterprise|enterprise-preview] [version]
8
+ # ./starter.sh [single|cluster] [image[:tag]]
9
+ # Example:
10
+ # ./starter.sh cluster enterprise 3.12.4
11
+ # ./starter.sh single enterprise-preview 4.0-nightly
12
+ # ./starter.sh single arangodb/enterprise-preview:4.0-nightly
13
+
14
+ setup="${1:-single}"
15
+ image="${2:-community}"
16
+ version="${3:-latest}"
17
+
18
+ extra_ports=""
19
+ if [ "$setup" == "single" ]; then
20
+ echo ""
21
+ elif [ "$setup" == "cluster" ]; then
22
+ extra_ports="-p 8539:8539 -p 8549:8549"
23
+ else
24
+ echo "Invalid argument. Please provide either 'single' or 'cluster'."
25
+ exit 1
26
+ fi
27
+
28
+ image_ref=""
29
+ if [[ "$image" == */* ]]; then
30
+ if [[ "$image" == *:* ]]; then
31
+ image_ref="$image"
32
+ if [ "$version" == "latest" ]; then
33
+ version="${image##*:}"
34
+ fi
35
+ else
36
+ image_ref="$image:$version"
37
+ fi
38
+ elif [ "$image" == "community" ]; then
39
+ image_ref="arangodb/arangodb:$version"
40
+ elif [ "$image" == "enterprise" ]; then
41
+ image_ref="arangodb/enterprise:$version"
42
+ elif [ "$image" == "enterprise-preview" ]; then
43
+ image_ref="arangodb/enterprise-preview:$version"
44
+ else
45
+ echo "Invalid argument. Please provide 'community', 'enterprise', 'enterprise-preview', or a full image reference."
46
+ exit 1
47
+ fi
48
+
49
+ if [ "$version" == "latest" ]; then
50
+ conf_file="${setup}-3.12"
51
+ elif [[ "$version" =~ ^([0-9]+\.[0-9]+) ]]; then
52
+ conf_file="${setup}-${BASH_REMATCH[1]}"
53
+ else
54
+ conf_file="${setup}-${version}"
55
+ fi
56
+
57
+ if [ ! -f "tests/static/$conf_file.conf" ]; then
58
+ echo "Missing configuration file: tests/static/$conf_file.conf"
59
+ exit 1
60
+ fi
61
+
62
+ docker run -d \
63
+ --name arango \
64
+ -p 8528:8528 \
65
+ -p 8529:8529 \
66
+ $extra_ports \
67
+ -v "$(pwd)/tests/static/":/tests/static \
68
+ -v /tmp:/tmp \
69
+ "$image_ref" \
70
+ /bin/sh -c "arangodb --configuration=/tests/static/$conf_file.conf"
71
+
72
+ if [ $? -ne 0 ]; then
73
+ echo "ERROR starter failed to start container"
74
+ exit 1
75
+ fi
76
+
77
+ wget --quiet --waitretry=1 --tries=120 -O - http://localhost:8528/version | jq
78
+ if [ $? -eq 0 ]; then
79
+ echo "OK starter ready"
80
+ exit 0
81
+ else
82
+ echo "ERROR starter not ready, giving up"
83
+ exit 1
84
+ fi
@@ -1 +0,0 @@
1
- __version__ = "8.3.1"
@@ -1,60 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Starts a local ArangoDB server or cluster (community or enterprise).
4
- # Useful for testing the python-arango driver against a local ArangoDB setup.
5
-
6
- # Usage:
7
- # ./starter.sh [single|cluster] [community|enterprise] [version]
8
- # Example:
9
- # ./starter.sh cluster enterprise 3.12.5
10
-
11
- setup="${1:-cluster}"
12
- license="${2:-enterprise}"
13
- version="${3:-latest}"
14
-
15
- extra_ports=""
16
- if [ "$setup" == "single" ]; then
17
- echo ""
18
- elif [ "$setup" == "cluster" ]; then
19
- extra_ports="-p 8539:8539 -p 8549:8549"
20
- else
21
- echo "Invalid argument. Please provide either 'single' or 'cluster'."
22
- exit 1
23
- fi
24
-
25
- image_name=""
26
- if [ "$license" == "community" ]; then
27
- image_name="arangodb"
28
- elif [ "$license" == "enterprise" ]; then
29
- image_name="enterprise"
30
- else
31
- echo "Invalid argument. Please provide either 'community' or 'enterprise'."
32
- exit 1
33
- fi
34
-
35
- if [ "$version" == "latest" ]; then
36
- conf_file="${setup}-3.12"
37
- elif [[ "$version" == *.*.* ]]; then
38
- conf_file="${setup}-${version%.*}"
39
- else
40
- conf_file="${setup}-${version}"
41
- fi
42
-
43
- docker run -d \
44
- --name arango \
45
- -p 8528:8528 \
46
- -p 8529:8529 \
47
- $extra_ports \
48
- -v "$(pwd)/tests/static/":/tests/static \
49
- -v /tmp:/tmp \
50
- "arangodb/$image_name:$version" \
51
- /bin/sh -c "arangodb --configuration=/tests/static/$conf_file.conf"
52
-
53
- wget --quiet --waitretry=1 --tries=120 -O - http://localhost:8528/version | jq
54
- if [ $? -eq 0 ]; then
55
- echo "OK starter ready"
56
- exit 0
57
- else
58
- echo "ERROR starter not ready, giving up"
59
- exit 1
60
- fi
File without changes
File without changes
File without changes
File without changes
File without changes