nucliadb 6.8.1.post4979__py3-none-any.whl → 6.8.1.post4983__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/reader/api/v1/learning_config.py +4 -15
- nucliadb/writer/api/v1/learning_config.py +5 -4
- {nucliadb-6.8.1.post4979.dist-info → nucliadb-6.8.1.post4983.dist-info}/METADATA +6 -6
- {nucliadb-6.8.1.post4979.dist-info → nucliadb-6.8.1.post4983.dist-info}/RECORD +7 -7
- {nucliadb-6.8.1.post4979.dist-info → nucliadb-6.8.1.post4983.dist-info}/WHEEL +0 -0
- {nucliadb-6.8.1.post4979.dist-info → nucliadb-6.8.1.post4983.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.8.1.post4979.dist-info → nucliadb-6.8.1.post4983.dist-info}/top_level.txt +0 -0
|
@@ -19,13 +19,12 @@
|
|
|
19
19
|
#
|
|
20
20
|
from typing import Dict
|
|
21
21
|
|
|
22
|
-
from fastapi import Request
|
|
22
|
+
from fastapi import Header, Request
|
|
23
23
|
from fastapi_versioning import version
|
|
24
24
|
from nuclia_models.config.proto import ExtractConfig, SplitConfiguration
|
|
25
25
|
|
|
26
26
|
from nucliadb.learning_proxy import learning_config_proxy
|
|
27
27
|
from nucliadb.models.responses import HTTPClientError
|
|
28
|
-
from nucliadb.reader import logger
|
|
29
28
|
from nucliadb.reader.api.v1.router import KB_PREFIX, api
|
|
30
29
|
from nucliadb_models.resource import NucliaDBRoles
|
|
31
30
|
from nucliadb_utils.authentication import requires_one
|
|
@@ -61,15 +60,11 @@ async def download_model(
|
|
|
61
60
|
)
|
|
62
61
|
@requires_one([NucliaDBRoles.READER, NucliaDBRoles.MANAGER])
|
|
63
62
|
@version(1)
|
|
64
|
-
async def get_configuration(
|
|
65
|
-
request: Request,
|
|
66
|
-
kbid: str,
|
|
67
|
-
):
|
|
63
|
+
async def get_configuration(request: Request, kbid: str):
|
|
68
64
|
return await learning_config_proxy(
|
|
69
65
|
request,
|
|
70
66
|
"GET",
|
|
71
67
|
f"/config/{kbid}",
|
|
72
|
-
headers={"account-id": request.headers.get("x-nucliadb-account", "")},
|
|
73
68
|
)
|
|
74
69
|
|
|
75
70
|
|
|
@@ -123,19 +118,13 @@ async def get_model(
|
|
|
123
118
|
@requires_one([NucliaDBRoles.READER, NucliaDBRoles.MANAGER])
|
|
124
119
|
@version(1)
|
|
125
120
|
async def get_schema_for_configuration_updates(
|
|
126
|
-
request: Request,
|
|
127
|
-
kbid: str,
|
|
121
|
+
request: Request, kbid: str, x_nucliadb_account: str = Header(default="", include_in_schema=False)
|
|
128
122
|
):
|
|
129
|
-
account_id = request.headers.get("x-nucliadb-account", "")
|
|
130
|
-
if not account_id:
|
|
131
|
-
logger.warning(
|
|
132
|
-
"Account header not sent by authorizer", extra={"request_headers": request.headers}
|
|
133
|
-
)
|
|
134
123
|
return await learning_config_proxy(
|
|
135
124
|
request,
|
|
136
125
|
"GET",
|
|
137
126
|
f"/schema/{kbid}",
|
|
138
|
-
headers={"account-id":
|
|
127
|
+
headers={"account-id": x_nucliadb_account},
|
|
139
128
|
)
|
|
140
129
|
|
|
141
130
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
# You should have received a copy of the GNU Affero General Public License
|
|
18
18
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
#
|
|
20
|
-
from fastapi import Request
|
|
20
|
+
from fastapi import Header, Request
|
|
21
21
|
from fastapi_versioning import version
|
|
22
22
|
from nuclia_models.config.proto import ExtractConfig, SplitConfiguration
|
|
23
23
|
|
|
@@ -55,10 +55,11 @@ async def set_configuration(
|
|
|
55
55
|
@requires_one([NucliaDBRoles.MANAGER, NucliaDBRoles.WRITER])
|
|
56
56
|
@version(1)
|
|
57
57
|
async def patch_configuration(
|
|
58
|
-
request: Request,
|
|
59
|
-
kbid: str,
|
|
58
|
+
request: Request, kbid: str, x_nucliadb_account: str = Header(default="", include_in_schema=False)
|
|
60
59
|
):
|
|
61
|
-
return await learning_config_proxy(
|
|
60
|
+
return await learning_config_proxy(
|
|
61
|
+
request, "PATCH", f"/config/{kbid}", headers={"account-id": x_nucliadb_account}
|
|
62
|
+
)
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
@api.post(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nucliadb
|
|
3
|
-
Version: 6.8.1.
|
|
3
|
+
Version: 6.8.1.post4983
|
|
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.post4983
|
|
23
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.8.1.post4983
|
|
24
|
+
Requires-Dist: nucliadb-protos>=6.8.1.post4983
|
|
25
|
+
Requires-Dist: nucliadb-models>=6.8.1.post4983
|
|
26
|
+
Requires-Dist: nidx-protos>=6.8.1.post4983
|
|
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]
|
|
@@ -206,7 +206,7 @@ nucliadb/reader/api/v1/__init__.py,sha256=ieP8lsCCwG66Jupv8II5MSTj6nh3eCtLcF4utH
|
|
|
206
206
|
nucliadb/reader/api/v1/download.py,sha256=F48YM3BPwuHwDgYk0jjRHHJHh732QUb4nCAS5xyNqzg,10819
|
|
207
207
|
nucliadb/reader/api/v1/export_import.py,sha256=x4VBNDFjnlY1nIt5kdq0eZTB_DeRzGzT8T7uB7wUhNU,6448
|
|
208
208
|
nucliadb/reader/api/v1/knowledgebox.py,sha256=e8q7v5JwGxsuPZLc_GkUOkWWSJMI2o483bK9ywhdkk8,3612
|
|
209
|
-
nucliadb/reader/api/v1/learning_config.py,sha256=
|
|
209
|
+
nucliadb/reader/api/v1/learning_config.py,sha256=wL4k9ZFK0BX17ocq1tUmbh-atLrw-Xag7Ly8wgD1xrQ,6812
|
|
210
210
|
nucliadb/reader/api/v1/resource.py,sha256=WTBIEywfHfy4sIffnVm9s__3--JpHi9hprVpK0Ddd04,14164
|
|
211
211
|
nucliadb/reader/api/v1/router.py,sha256=eyNmEGSP9zHkCIG5XlAXl6sukq950B7gFT3X2peMtIE,1011
|
|
212
212
|
nucliadb/reader/api/v1/services.py,sha256=Fcj4fRDBNnIwnf5Q3VZxpP_6UwdPYOtyEZUGr9_lhqo,13438
|
|
@@ -357,7 +357,7 @@ nucliadb/writer/api/v1/__init__.py,sha256=akI9A_jloNLb0dU4T5zjfdyvmSAiDeIdjAlzNx
|
|
|
357
357
|
nucliadb/writer/api/v1/export_import.py,sha256=v0sU55TtRSqDzwkDgcwv2uSaqKCuQTtGcMpYoHQYBQA,8192
|
|
358
358
|
nucliadb/writer/api/v1/field.py,sha256=aO4GFzadXnMhGlAfvJc5KkObii_z6a8R80yCdvjKEc8,18966
|
|
359
359
|
nucliadb/writer/api/v1/knowledgebox.py,sha256=kioqjD3yN-y1cDTgmXAAOwivXHX9NXxwblcSzGqJup0,9533
|
|
360
|
-
nucliadb/writer/api/v1/learning_config.py,sha256=
|
|
360
|
+
nucliadb/writer/api/v1/learning_config.py,sha256=DTLEzKJ3dHvi8pbZscjElUqCH_ZvLc6WZgvalFqHo10,4450
|
|
361
361
|
nucliadb/writer/api/v1/resource.py,sha256=IfcT6HXnR5sC5wSnQSuKmFzEWcLTh7OzZEAV4hYmXnA,20442
|
|
362
362
|
nucliadb/writer/api/v1/router.py,sha256=RjuoWLpZer6Kl2BW_wznpNo6XL3BOpdTGqXZCn3QrrQ,1034
|
|
363
363
|
nucliadb/writer/api/v1/services.py,sha256=3AUjk-SmvqJx76v7y89DZx6oyasojPliGYeniRQjpcU,13337
|
|
@@ -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.post4983.dist-info/METADATA,sha256=WfHx_riZOyQ6ECBsqAHKo3u53hOcaI41g4AxfUftIeo,4158
|
|
383
|
+
nucliadb-6.8.1.post4983.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
384
|
+
nucliadb-6.8.1.post4983.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
|
385
|
+
nucliadb-6.8.1.post4983.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
|
386
|
+
nucliadb-6.8.1.post4983.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|