python-arango 8.3.1__py3-none-any.whl → 8.3.3__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 +6 -0
- arango/cluster.py +5 -0
- arango/collection.py +21 -149
- arango/database.py +29 -2
- arango/formatter.py +7 -0
- arango/foxx.py +4 -1
- arango/replication.py +4 -0
- arango/version.py +1 -1
- arango/wal.py +15 -3
- {python_arango-8.3.1.dist-info → python_arango-8.3.3.dist-info}/METADATA +2 -2
- {python_arango-8.3.1.dist-info → python_arango-8.3.3.dist-info}/RECORD +14 -14
- {python_arango-8.3.1.dist-info → python_arango-8.3.3.dist-info}/WHEEL +0 -0
- {python_arango-8.3.1.dist-info → python_arango-8.3.3.dist-info}/licenses/LICENSE +0 -0
- {python_arango-8.3.1.dist-info → python_arango-8.3.3.dist-info}/top_level.txt +0 -0
arango/aql.py
CHANGED
|
@@ -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
|
arango/cluster.py
CHANGED
|
@@ -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.
|
arango/collection.py
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
arango/database.py
CHANGED
|
@@ -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
|
|
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.
|
arango/formatter.py
CHANGED
|
@@ -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
|
|
arango/foxx.py
CHANGED
|
@@ -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}>"
|
arango/replication.py
CHANGED
|
@@ -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",
|
arango/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.3.
|
|
1
|
+
__version__ = "8.3.3"
|
arango/wal.py
CHANGED
|
@@ -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
|
-
"""
|
|
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:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-arango
|
|
3
|
-
Version: 8.3.
|
|
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 {
|
|
186
|
+
OPTIONS { order: 'bfs', uniqueVertices: 'global' }
|
|
187
187
|
RETURN {vertex: v, edge: e, path: p}
|
|
188
188
|
"""
|
|
189
189
|
cursor = db.aql.execute(query)
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
arango/__init__.py,sha256=SFKHBP0iYw1c4mJbLn6pxiGIKVUpsS_nQcZ0aEptrZw,192
|
|
2
2
|
arango/api.py,sha256=OzN3d4p1fagRG_BXnjgrp0TeE__hQmm9WDEkjefa6UA,1956
|
|
3
|
-
arango/aql.py,sha256=
|
|
3
|
+
arango/aql.py,sha256=HaoEx1CWvEtKTkbocEtS-73MyAAhuTxJnenqDg41voM,31420
|
|
4
4
|
arango/backup.py,sha256=lK7ihCRPrsBlQ35KtyYplhX6Lw0GzqCbGTLPbPTBh20,8651
|
|
5
5
|
arango/client.py,sha256=t-mJZ9I7ZJebILW6zm4qAhgExEEzvwTVNdkHp7DP2iU,11787
|
|
6
|
-
arango/cluster.py,sha256=
|
|
7
|
-
arango/collection.py,sha256=
|
|
6
|
+
arango/cluster.py,sha256=4EAMftT_Zm2kBVtvWF9RSy-EYdsGgKujE6mI52HtV8Q,18655
|
|
7
|
+
arango/collection.py,sha256=ZZPJqkv-CYgKPa9Dq0Hd6XWsmTxjw_kDLfo1cqwrHDQ,135437
|
|
8
8
|
arango/connection.py,sha256=euqleZQOBkZ06zkY1uztGWeDeZLEYnekvHs2WK_K1Gk,18919
|
|
9
9
|
arango/cursor.py,sha256=4iIhYXWwzHnxKKk0oNk-ynNeQ1BWJDS4gy1ApzYtNl8,11156
|
|
10
|
-
arango/database.py,sha256=
|
|
10
|
+
arango/database.py,sha256=dLKS-kUF0P_SSBFAKSYu8XpEwe61Ex9Y56MZBc5UKso,134085
|
|
11
11
|
arango/errno.py,sha256=4oKY9IyyzjOitbywhjH8S214qeNtpDlQg7JsHENJNoU,25245
|
|
12
12
|
arango/exceptions.py,sha256=N2sUD6_aJQqsrXXluDrQkXo143d8M07ziqZQK5VN_rk,26225
|
|
13
13
|
arango/executor.py,sha256=ahez3ar-FLZLWv4pu1IYhAi_EdhbwsME82N_hkB1PSw,16000
|
|
14
|
-
arango/formatter.py,sha256=
|
|
15
|
-
arango/foxx.py,sha256=
|
|
14
|
+
arango/formatter.py,sha256=v_q93uvmUsYVsvxoHb2fAskqGxi3zRT88IUQCZgc9z4,42861
|
|
15
|
+
arango/foxx.py,sha256=Ni5AnmuTq2ghD_yXHZkDkH45gj5J6lqEWYScp-9aGC0,32828
|
|
16
16
|
arango/graph.py,sha256=UPxiN0JgyzZGYc1aZZ1tiiOsz9fStInEGS6SySDaFW0,36282
|
|
17
17
|
arango/http.py,sha256=36Us7VBcOcHH2kdWg8ZpPkD-4Po8U5ScQvR1MATGVr0,10215
|
|
18
18
|
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
|
-
arango/replication.py,sha256=
|
|
21
|
+
arango/replication.py,sha256=zBE8mz_EVFuNXvzmHd5Lyqe6JNWPQ1cxb5Td1gSrkEg,34088
|
|
22
22
|
arango/request.py,sha256=dmx_fFg5kHq82fA-dhFStJERYtipuZSTW1lwXrbQqOo,4167
|
|
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
|
-
arango/version.py,sha256=
|
|
29
|
-
arango/wal.py,sha256=
|
|
30
|
-
python_arango-8.3.
|
|
31
|
-
python_arango-8.3.
|
|
32
|
-
python_arango-8.3.
|
|
33
|
-
python_arango-8.3.
|
|
34
|
-
python_arango-8.3.
|
|
28
|
+
arango/version.py,sha256=j3biFv9elxtizF3Ej8M0japNj4KYN9ypfb0o-_kpZJY,22
|
|
29
|
+
arango/wal.py,sha256=ubZvztThBrmPDBYkpUtnz8XDLICRTfaMeXSfqQwMauw,11700
|
|
30
|
+
python_arango-8.3.3.dist-info/licenses/LICENSE,sha256=e86a4kkFfMBuoffCn4RLmQGC2LUqNs78i5npEsJ1b5I,1072
|
|
31
|
+
python_arango-8.3.3.dist-info/METADATA,sha256=qPFmMfrfpKthuQNkgZZwqCCjzc-c9oDD5i7IIY84iCg,8356
|
|
32
|
+
python_arango-8.3.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
33
|
+
python_arango-8.3.3.dist-info/top_level.txt,sha256=F8H1mznbOGduHSsSET9uiPd72kJ1fGbejiuzYMm9XqA,7
|
|
34
|
+
python_arango-8.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|