nucliadb 6.8.1.post4945__py3-none-any.whl → 6.8.1.post4961__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.
Potentially problematic release.
This version of nucliadb might be problematic. Click here for more details.
- nucliadb/common/nidx.py +18 -0
- nucliadb/writer/tus/azure.py +4 -4
- {nucliadb-6.8.1.post4945.dist-info → nucliadb-6.8.1.post4961.dist-info}/METADATA +6 -6
- {nucliadb-6.8.1.post4945.dist-info → nucliadb-6.8.1.post4961.dist-info}/RECORD +7 -7
- {nucliadb-6.8.1.post4945.dist-info → nucliadb-6.8.1.post4961.dist-info}/WHEEL +0 -0
- {nucliadb-6.8.1.post4945.dist-info → nucliadb-6.8.1.post4961.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.8.1.post4945.dist-info → nucliadb-6.8.1.post4961.dist-info}/top_level.txt +0 -0
nucliadb/common/nidx.py
CHANGED
|
@@ -82,6 +82,24 @@ def _storage_config(prefix: str, bucket: Optional[str]) -> dict[str, str]:
|
|
|
82
82
|
config[f"{prefix}__REGION_NAME"] = storage_settings.s3_region_name or ""
|
|
83
83
|
if storage_settings.s3_endpoint:
|
|
84
84
|
config[f"{prefix}__ENDPOINT"] = storage_settings.s3_endpoint
|
|
85
|
+
elif storage_settings.file_backend == FileBackendConfig.AZURE:
|
|
86
|
+
if storage_settings.azure_account_url is None:
|
|
87
|
+
raise ValueError("Azure account is required")
|
|
88
|
+
config[f"{prefix}__OBJECT_STORE"] = "azure"
|
|
89
|
+
url = storage_settings.azure_account_url
|
|
90
|
+
container = bucket or extended_storage_settings.azure_indexing_bucket
|
|
91
|
+
if container:
|
|
92
|
+
url += f"/{container}"
|
|
93
|
+
config[f"{prefix}__CONTAINER_URL"] = url
|
|
94
|
+
if storage_settings.azure_connection_string:
|
|
95
|
+
params = {
|
|
96
|
+
p.split("=", 1)[0]: p.split("=", 1)[1]
|
|
97
|
+
for p in storage_settings.azure_connection_string.split(";")
|
|
98
|
+
}
|
|
99
|
+
if "AccountKey" in params:
|
|
100
|
+
config[f"{prefix}__ACCOUNT_KEY"] = params["AccountKey"]
|
|
101
|
+
if "BlobEndpoint" in params:
|
|
102
|
+
config[f"{prefix}__ENDPOINT"] = params["BlobEndpoint"]
|
|
85
103
|
|
|
86
104
|
return config
|
|
87
105
|
|
nucliadb/writer/tus/azure.py
CHANGED
|
@@ -27,7 +27,6 @@ from nucliadb.writer.tus.storage import BlobStore, FileStorageManager
|
|
|
27
27
|
from nucliadb_protos.resources_pb2 import CloudFile
|
|
28
28
|
from nucliadb_utils.storages import CHUNK_SIZE
|
|
29
29
|
from nucliadb_utils.storages.azure import AzureObjectStore
|
|
30
|
-
from nucliadb_utils.storages.exceptions import ObjectNotFoundError
|
|
31
30
|
from nucliadb_utils.storages.utils import ObjectMetadata
|
|
32
31
|
|
|
33
32
|
|
|
@@ -63,7 +62,7 @@ class AzureBlobStore(BlobStore):
|
|
|
63
62
|
class AzureFileStorageManager(FileStorageManager):
|
|
64
63
|
storage: AzureBlobStore
|
|
65
64
|
chunk_size = CHUNK_SIZE
|
|
66
|
-
min_upload_size =
|
|
65
|
+
min_upload_size = CHUNK_SIZE
|
|
67
66
|
|
|
68
67
|
@property
|
|
69
68
|
def object_store(self) -> AzureObjectStore:
|
|
@@ -87,7 +86,7 @@ class AzureFileStorageManager(FileStorageManager):
|
|
|
87
86
|
bucket = self.storage.get_bucket_name(kbid)
|
|
88
87
|
try:
|
|
89
88
|
await self.object_store.delete(bucket, uri)
|
|
90
|
-
except
|
|
89
|
+
except KeyError:
|
|
91
90
|
logger.warning(
|
|
92
91
|
"Attempt to delete an upload but not found",
|
|
93
92
|
extra={"uri": uri, "kbid": kbid, "bucket": bucket},
|
|
@@ -108,4 +107,5 @@ class AzureFileStorageManager(FileStorageManager):
|
|
|
108
107
|
return path
|
|
109
108
|
|
|
110
109
|
def validate_intermediate_chunk(self, uploaded_bytes: int):
|
|
111
|
-
|
|
110
|
+
if uploaded_bytes < self.min_upload_size:
|
|
111
|
+
raise ValueError(f"Intermediate chunks cannot be smaller than {self.min_upload_size} bytes")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nucliadb
|
|
3
|
-
Version: 6.8.1.
|
|
3
|
+
Version: 6.8.1.post4961
|
|
4
4
|
Summary: NucliaDB
|
|
5
5
|
Author-email: Nuclia <nucliadb@nuclia.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
20
|
Requires-Python: <4,>=3.9
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
|
-
Requires-Dist: nucliadb-telemetry[all]>=6.8.1.
|
|
23
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.8.1.
|
|
24
|
-
Requires-Dist: nucliadb-protos>=6.8.1.
|
|
25
|
-
Requires-Dist: nucliadb-models>=6.8.1.
|
|
26
|
-
Requires-Dist: nidx-protos>=6.8.1.
|
|
22
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.8.1.post4961
|
|
23
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.8.1.post4961
|
|
24
|
+
Requires-Dist: nucliadb-protos>=6.8.1.post4961
|
|
25
|
+
Requires-Dist: nucliadb-models>=6.8.1.post4961
|
|
26
|
+
Requires-Dist: nidx-protos>=6.8.1.post4961
|
|
27
27
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
|
28
28
|
Requires-Dist: nuclia-models>=0.47.0
|
|
29
29
|
Requires-Dist: uvicorn[standard]
|
|
@@ -68,7 +68,7 @@ nucliadb/common/exceptions.py,sha256=_PJk_NfAhZBFBvmgAfvsJKZ9KuRt5Y1cNsH3-cXE07w
|
|
|
68
68
|
nucliadb/common/filter_expression.py,sha256=-6buKY1SCVYpkrG_60Ui3ebSDWnXeF_xVmBCrNipoII,6569
|
|
69
69
|
nucliadb/common/ids.py,sha256=4QjoIofes_vtKj2HsFWZf8VVIVWXxdkYtLpx1n618Us,8239
|
|
70
70
|
nucliadb/common/locking.py,sha256=eZG47mI1OPnKbxSd95qa6jDXBhUoxVBIuSjxoEuBRWE,5894
|
|
71
|
-
nucliadb/common/nidx.py,sha256=
|
|
71
|
+
nucliadb/common/nidx.py,sha256=BcvNIwCbgrZbCDy3DYULTcuYqrHHRf1_2o2jETYEhHo,10099
|
|
72
72
|
nucliadb/common/vector_index_config.py,sha256=DQrlraTWE5uUn68l9s10d3wobNeVtbP-ANEQmUfSWyo,1553
|
|
73
73
|
nucliadb/common/back_pressure/__init__.py,sha256=paAcAZcfGRTyURF9lnn3vX0vcwakTEVswG_xcdGBH-U,928
|
|
74
74
|
nucliadb/common/back_pressure/cache.py,sha256=ANvXglWzI5naAD6N4E_fNi17qS6KNyAhjLeh6WlZZ84,2931
|
|
@@ -371,7 +371,7 @@ nucliadb/writer/resource/basic.py,sha256=44GK8M9EEVoAUfGiabdLrrpENqeFwNn7qwxF2AH
|
|
|
371
371
|
nucliadb/writer/resource/field.py,sha256=1fHm2N-3LcgQDE3BUDiJ0ToCiwY1Di7UbA6fcJs8BIk,21193
|
|
372
372
|
nucliadb/writer/resource/origin.py,sha256=pvhUDdU0mlWPUcpoQi4LDUJaRtfjzVVrA8XcGVI_N8k,2021
|
|
373
373
|
nucliadb/writer/tus/__init__.py,sha256=Kera0BtxoDX0ngPftXiMjNgjrhtQ3l2XFc5nJqSBOJY,5498
|
|
374
|
-
nucliadb/writer/tus/azure.py,sha256=
|
|
374
|
+
nucliadb/writer/tus/azure.py,sha256=yxoRi4PhGDikTqVK3PiuVyguy8H9DOS66JpZCY4hpUY,4177
|
|
375
375
|
nucliadb/writer/tus/dm.py,sha256=bVoXqt_dpNvTjpffPYhj1JfqK6gfLoPr0hdkknUCZ9E,5488
|
|
376
376
|
nucliadb/writer/tus/exceptions.py,sha256=WfZSSjsHfoy63wUFlH3QoHx7FMoCNA1oKJmWpZZDnCo,2156
|
|
377
377
|
nucliadb/writer/tus/gcs.py,sha256=pzJDJSXZKh7VrFYw-wiRSCCXfXklfGwDZSMAnjoh_48,13871
|
|
@@ -379,8 +379,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
|
379
379
|
nucliadb/writer/tus/s3.py,sha256=vu1BGg4VqJ_x2P1u2BxqPKlSfw5orT_a3R-Ln5oPUpU,8483
|
|
380
380
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
|
381
381
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
|
382
|
-
nucliadb-6.8.1.
|
|
383
|
-
nucliadb-6.8.1.
|
|
384
|
-
nucliadb-6.8.1.
|
|
385
|
-
nucliadb-6.8.1.
|
|
386
|
-
nucliadb-6.8.1.
|
|
382
|
+
nucliadb-6.8.1.post4961.dist-info/METADATA,sha256=vzX9DjxIuwhfAMwJecfj3FxnX_UrCNweM9-xCXd4N7U,4158
|
|
383
|
+
nucliadb-6.8.1.post4961.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
384
|
+
nucliadb-6.8.1.post4961.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
|
385
|
+
nucliadb-6.8.1.post4961.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
|
386
|
+
nucliadb-6.8.1.post4961.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|