nucliadb 6.3.0.post3402__py3-none-any.whl → 6.3.0.post3415__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.
- nucliadb/export_import/datamanager.py +2 -2
- nucliadb/export_import/utils.py +3 -1
- {nucliadb-6.3.0.post3402.dist-info → nucliadb-6.3.0.post3415.dist-info}/METADATA +6 -6
- {nucliadb-6.3.0.post3402.dist-info → nucliadb-6.3.0.post3415.dist-info}/RECORD +7 -7
- {nucliadb-6.3.0.post3402.dist-info → nucliadb-6.3.0.post3415.dist-info}/WHEEL +1 -1
- {nucliadb-6.3.0.post3402.dist-info → nucliadb-6.3.0.post3415.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.3.0.post3402.dist-info → nucliadb-6.3.0.post3415.dist-info}/top_level.txt +0 -0
@@ -30,7 +30,7 @@ from nucliadb_telemetry import errors
|
|
30
30
|
from nucliadb_utils.storages.storage import Storage, StorageField
|
31
31
|
|
32
32
|
MAINDB_EXPORT_KEY = "/kbs/{kbid}/exports/{id}"
|
33
|
-
|
33
|
+
MAINDB_IMPORT_KEY = "/kbs/{kbid}/imports/{id}"
|
34
34
|
STORAGE_EXPORT_KEY = "exports/{export_id}"
|
35
35
|
STORAGE_IMPORT_KEY = "imports/{import_id}"
|
36
36
|
|
@@ -49,7 +49,7 @@ class ExportImportDataManager:
|
|
49
49
|
def _get_maindb_metadata_key(self, type: str, kbid: str, id: str) -> str:
|
50
50
|
if type not in ("export", "import"):
|
51
51
|
raise ValueError(f"Invalid type: {type}")
|
52
|
-
key = MAINDB_EXPORT_KEY if type == "export" else
|
52
|
+
key = MAINDB_EXPORT_KEY if type == "export" else MAINDB_IMPORT_KEY
|
53
53
|
return key.format(kbid=kbid, id=id)
|
54
54
|
|
55
55
|
async def get_metadata(self, type: str, kbid: str, id: str) -> Metadata:
|
nucliadb/export_import/utils.py
CHANGED
@@ -134,6 +134,7 @@ async def import_binary(
|
|
134
134
|
bucket_name = context.blob_storage.get_bucket_name(kbid)
|
135
135
|
new_cf.bucket_name = bucket_name
|
136
136
|
|
137
|
+
# Replace the source kbid with the destination kbid
|
137
138
|
src_kb = cf.uri.split("/")[1]
|
138
139
|
new_cf.uri = new_cf.uri.replace(src_kb, kbid, 1)
|
139
140
|
|
@@ -235,7 +236,8 @@ def _clone_collect_cf(binaries: list[resources_pb2.CloudFile], origin: resources
|
|
235
236
|
async def download_binary(
|
236
237
|
context: ApplicationContext, cf: resources_pb2.CloudFile
|
237
238
|
) -> AsyncGenerator[bytes, None]:
|
238
|
-
|
239
|
+
bucket_name = context.blob_storage.get_bucket_name_from_cf(cf)
|
240
|
+
async for data in context.blob_storage.download(bucket_name, cf.uri):
|
239
241
|
yield data
|
240
242
|
|
241
243
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: nucliadb
|
3
|
-
Version: 6.3.0.
|
3
|
+
Version: 6.3.0.post3415
|
4
4
|
Summary: NucliaDB
|
5
5
|
Author-email: Nuclia <nucliadb@nuclia.com>
|
6
6
|
License: AGPL
|
@@ -20,11 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
21
21
|
Requires-Python: <4,>=3.9
|
22
22
|
Description-Content-Type: text/markdown
|
23
|
-
Requires-Dist: nucliadb-telemetry[all]>=6.3.0.
|
24
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.0.
|
25
|
-
Requires-Dist: nucliadb-protos>=6.3.0.
|
26
|
-
Requires-Dist: nucliadb-models>=6.3.0.
|
27
|
-
Requires-Dist: nidx-protos>=6.3.0.
|
23
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.3.0.post3415
|
24
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.0.post3415
|
25
|
+
Requires-Dist: nucliadb-protos>=6.3.0.post3415
|
26
|
+
Requires-Dist: nucliadb-models>=6.3.0.post3415
|
27
|
+
Requires-Dist: nidx-protos>=6.3.0.post3415
|
28
28
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
29
29
|
Requires-Dist: nuclia-models>=0.24.2
|
30
30
|
Requires-Dist: uvicorn
|
@@ -94,13 +94,13 @@ nucliadb/common/models_utils/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJ
|
|
94
94
|
nucliadb/common/models_utils/from_proto.py,sha256=d-q6-JWvjVVxtI57itQVKRIY8Hzv-tBhDt-tr4aIKNM,15979
|
95
95
|
nucliadb/common/models_utils/to_proto.py,sha256=97JvOR_3odu50YvzLa2CERfEN3w_QPmAVcCJwJB5m5A,2438
|
96
96
|
nucliadb/export_import/__init__.py,sha256=y-Is0Bxa8TMV6UiOW0deC_D3U465P65CQ5RjBjIWnow,932
|
97
|
-
nucliadb/export_import/datamanager.py,sha256=
|
97
|
+
nucliadb/export_import/datamanager.py,sha256=ZL96M6WuyrFLcGdoM6Cb6hQwrGFRtSeRlsKuvDjV3sY,6722
|
98
98
|
nucliadb/export_import/exceptions.py,sha256=Dw8WqfG4r6MPJc5TPfbjMvCgXXWTcTOecGHRVU1h3kM,1949
|
99
99
|
nucliadb/export_import/exporter.py,sha256=kgbW-B7FNW7mlc9rBVEfwkkFTqD58TWSTDe9zkmEnBc,7098
|
100
100
|
nucliadb/export_import/importer.py,sha256=v5cq9Nn8c2zrY_K_00mydR52f8mdFxR7tLdtNLQ0qvk,4229
|
101
101
|
nucliadb/export_import/models.py,sha256=dbjScNkiMRv4X3Ktudy1JRliD25bfoDTy3JmEZgQSCc,2121
|
102
102
|
nucliadb/export_import/tasks.py,sha256=fpCBeFYPReyLIdk38LDM9Tpnw_VczeMrobT4n1RAIp4,2507
|
103
|
-
nucliadb/export_import/utils.py,sha256=
|
103
|
+
nucliadb/export_import/utils.py,sha256=t7xLA3f5W3zGq3HNXe3noOQnY7gRO8TAoe8S8BG3_so,19733
|
104
104
|
nucliadb/ingest/__init__.py,sha256=fsw3C38VP50km3R-nHL775LNGPpJ4JxqXJ2Ib1f5SqE,1011
|
105
105
|
nucliadb/ingest/app.py,sha256=n5PlZyrf-bJsrc6jMRSO4DTjGyZLb4q6EA6Y4x6TYfQ,7028
|
106
106
|
nucliadb/ingest/cache.py,sha256=w7jMMzamOmQ7gwXna6Dqm6isRNBVv6l5BTBlTxaYWjE,1005
|
@@ -338,8 +338,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
338
338
|
nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
|
339
339
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
340
340
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
341
|
-
nucliadb-6.3.0.
|
342
|
-
nucliadb-6.3.0.
|
343
|
-
nucliadb-6.3.0.
|
344
|
-
nucliadb-6.3.0.
|
345
|
-
nucliadb-6.3.0.
|
341
|
+
nucliadb-6.3.0.post3415.dist-info/METADATA,sha256=FcbxsE9jA5QXuF9Dn_jimOjtz5hp2FUrXBhKBFqFGfs,4291
|
342
|
+
nucliadb-6.3.0.post3415.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
343
|
+
nucliadb-6.3.0.post3415.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
344
|
+
nucliadb-6.3.0.post3415.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
345
|
+
nucliadb-6.3.0.post3415.dist-info/RECORD,,
|
File without changes
|
File without changes
|