nucliadb 6.9.0.post5110__py3-none-any.whl → 6.9.0.post5124__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/reader/api/v1/knowledgebox.py +10 -4
- nucliadb/search/search/query_parser/parsers/common.py +1 -1
- {nucliadb-6.9.0.post5110.dist-info → nucliadb-6.9.0.post5124.dist-info}/METADATA +6 -6
- {nucliadb-6.9.0.post5110.dist-info → nucliadb-6.9.0.post5124.dist-info}/RECORD +7 -7
- {nucliadb-6.9.0.post5110.dist-info → nucliadb-6.9.0.post5124.dist-info}/WHEEL +0 -0
- {nucliadb-6.9.0.post5110.dist-info → nucliadb-6.9.0.post5124.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.9.0.post5110.dist-info → nucliadb-6.9.0.post5124.dist-info}/top_level.txt +0 -0
|
@@ -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 HTTPException
|
|
20
|
+
from fastapi import Header, HTTPException
|
|
21
21
|
from fastapi_versioning import version
|
|
22
22
|
from starlette.requests import Request
|
|
23
23
|
|
|
@@ -85,12 +85,18 @@ async def get_kb(request: Request, kbid: str) -> KnowledgeBoxObj:
|
|
|
85
85
|
)
|
|
86
86
|
@requires_one([NucliaDBRoles.MANAGER, NucliaDBRoles.READER])
|
|
87
87
|
@version(1)
|
|
88
|
-
async def get_kb_by_slug(
|
|
88
|
+
async def get_kb_by_slug(
|
|
89
|
+
request: Request, slug: str, x_nucliadb_account: str = Header(default="", include_in_schema=False)
|
|
90
|
+
) -> KnowledgeBoxObj:
|
|
89
91
|
driver = get_driver()
|
|
90
92
|
async with driver.ro_transaction() as txn:
|
|
91
|
-
|
|
93
|
+
# For cloud, the account id is prepended in order to be able to reuse the same slug in different accounts.
|
|
94
|
+
kbid = await datamanagers.kb.get_kb_uuid(txn, slug=f"{x_nucliadb_account}:{slug}")
|
|
92
95
|
if kbid is None:
|
|
93
|
-
|
|
96
|
+
# For onprem, the slug is fully controlled by the user
|
|
97
|
+
kbid = await datamanagers.kb.get_kb_uuid(txn, slug=slug)
|
|
98
|
+
if kbid is None:
|
|
99
|
+
raise HTTPException(status_code=404, detail="Knowledge Box does not exist")
|
|
94
100
|
|
|
95
101
|
kb_config = await datamanagers.kb.get_config(txn, kbid=kbid)
|
|
96
102
|
if kb_config is None:
|
|
@@ -37,7 +37,7 @@ def validate_query_syntax(query: str) -> str:
|
|
|
37
37
|
|
|
38
38
|
# -* is an invalid query in tantivy and it won't return results but if you add some whitespaces
|
|
39
39
|
# between - and *, it will actually trigger a tantivy bug and panic
|
|
40
|
-
INVALID_QUERY = re.compile(r"-
|
|
40
|
+
INVALID_QUERY = re.compile(r"- *\*+")
|
|
41
41
|
if INVALID_QUERY.search(query):
|
|
42
42
|
# remove the * and extra spaces, as it's probably what doesn't have
|
|
43
43
|
# meaning in both cases: -* and - *
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nucliadb
|
|
3
|
-
Version: 6.9.0.
|
|
3
|
+
Version: 6.9.0.post5124
|
|
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.9.0.
|
|
23
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.9.0.
|
|
24
|
-
Requires-Dist: nucliadb-protos>=6.9.0.
|
|
25
|
-
Requires-Dist: nucliadb-models>=6.9.0.
|
|
26
|
-
Requires-Dist: nidx-protos>=6.9.0.
|
|
22
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.9.0.post5124
|
|
23
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.9.0.post5124
|
|
24
|
+
Requires-Dist: nucliadb-protos>=6.9.0.post5124
|
|
25
|
+
Requires-Dist: nucliadb-models>=6.9.0.post5124
|
|
26
|
+
Requires-Dist: nidx-protos>=6.9.0.post5124
|
|
27
27
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
|
28
28
|
Requires-Dist: nuclia-models>=0.50.0
|
|
29
29
|
Requires-Dist: uvicorn[standard]
|
|
@@ -205,7 +205,7 @@ nucliadb/reader/api/models.py,sha256=UHhOPmh8xcHhDjFm8_-8t66yEggXdxRBoY0xV-hI9to
|
|
|
205
205
|
nucliadb/reader/api/v1/__init__.py,sha256=ieP8lsCCwG66Jupv8II5MSTj6nh3eCtLcF4utH9JOcU,1102
|
|
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
|
-
nucliadb/reader/api/v1/knowledgebox.py,sha256=
|
|
208
|
+
nucliadb/reader/api/v1/knowledgebox.py,sha256=POvDz6TE8PDE7HqmN0ty8LZfvhxoWrzRxlKXqHbJEHA,4007
|
|
209
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
|
|
@@ -285,7 +285,7 @@ nucliadb/search/search/query_parser/old_filters.py,sha256=GsU3T3-WiSPvjucP7evHks
|
|
|
285
285
|
nucliadb/search/search/query_parser/parsers/__init__.py,sha256=ySCNSdbesLXGZyR88919njulA6UE10_3PhqMG_Yj1o4,1034
|
|
286
286
|
nucliadb/search/search/query_parser/parsers/ask.py,sha256=ySa3lBhUuammIchJvj7xodeGIYGkR0uyLnHuOtLfWE8,2810
|
|
287
287
|
nucliadb/search/search/query_parser/parsers/catalog.py,sha256=DErVfWJ9a_F5a8Qbht1WY4Lm8r3ui9Y3C7oJMOOZOng,7474
|
|
288
|
-
nucliadb/search/search/query_parser/parsers/common.py,sha256=
|
|
288
|
+
nucliadb/search/search/query_parser/parsers/common.py,sha256=LvpCHL5a8mwVn3_3MMZq9WiVHOFMfLuJlZKvh_neHiM,6872
|
|
289
289
|
nucliadb/search/search/query_parser/parsers/find.py,sha256=7z6GDscMGybvlXENAKOs7XM3p1IJmdC-AZsb4GX_O3g,12698
|
|
290
290
|
nucliadb/search/search/query_parser/parsers/graph.py,sha256=s7nCB7ly_4BZWds-8zce1R-r2fHSiEhAK8P-eL14wTk,9390
|
|
291
291
|
nucliadb/search/search/query_parser/parsers/search.py,sha256=k9JaE9qWGi_eUxEKe_pOKrMIpx7k2wr2j3XrNqZJx9A,10428
|
|
@@ -384,8 +384,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
|
384
384
|
nucliadb/writer/tus/s3.py,sha256=vu1BGg4VqJ_x2P1u2BxqPKlSfw5orT_a3R-Ln5oPUpU,8483
|
|
385
385
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
|
386
386
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
|
387
|
-
nucliadb-6.9.0.
|
|
388
|
-
nucliadb-6.9.0.
|
|
389
|
-
nucliadb-6.9.0.
|
|
390
|
-
nucliadb-6.9.0.
|
|
391
|
-
nucliadb-6.9.0.
|
|
387
|
+
nucliadb-6.9.0.post5124.dist-info/METADATA,sha256=Gf4gSYOgv650Wiaw0jUyKdWOc3CYvLcOvmx2vekTKeo,4158
|
|
388
|
+
nucliadb-6.9.0.post5124.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
389
|
+
nucliadb-6.9.0.post5124.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
|
390
|
+
nucliadb-6.9.0.post5124.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
|
391
|
+
nucliadb-6.9.0.post5124.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|