nucliadb-utils 5.0.1.post1114__py3-none-any.whl → 5.0.1.post1116__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_utils/aiopynecone/exceptions.py +18 -3
- nucliadb_utils/const.py +1 -0
- nucliadb_utils/featureflagging.py +4 -0
- {nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/METADATA +3 -3
- {nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/RECORD +8 -8
- {nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/WHEEL +0 -0
- {nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/zip-safe +0 -0
@@ -60,6 +60,14 @@ class PineconeRateLimitError(PineconeAPIError):
|
|
60
60
|
pass
|
61
61
|
|
62
62
|
|
63
|
+
class PineconeNeedsPlanUpgradeError(PineconeAPIError):
|
64
|
+
"""
|
65
|
+
Raised when the client needs to upgrade the plan to continue using the service.
|
66
|
+
"""
|
67
|
+
|
68
|
+
pass
|
69
|
+
|
70
|
+
|
63
71
|
class MetadataTooLargeError(ValueError):
|
64
72
|
"""
|
65
73
|
Raised when the metadata of a vector to be upserted is too large.
|
@@ -79,12 +87,19 @@ def raise_for_status(operation: str, response: httpx.Response):
|
|
79
87
|
try:
|
80
88
|
resp_json = response.json()
|
81
89
|
error = resp_json.get("error") or {}
|
82
|
-
code = error.get("code")
|
83
|
-
message = error.get("message")
|
84
|
-
details = error.get("details")
|
90
|
+
code = resp_json.get("code") or error.get("code")
|
91
|
+
message = resp_json.get("message") or error.get("message") or ""
|
92
|
+
details = resp_json.get("details") or error.get("details")
|
85
93
|
except Exception: # pragma: no cover
|
86
94
|
message = response.text
|
87
95
|
if response.status_code == 429:
|
96
|
+
if "month" in message:
|
97
|
+
raise PineconeNeedsPlanUpgradeError(
|
98
|
+
http_status_code=response.status_code,
|
99
|
+
code=code,
|
100
|
+
message=message,
|
101
|
+
details=details,
|
102
|
+
)
|
88
103
|
raise PineconeRateLimitError(
|
89
104
|
http_status_code=response.status_code,
|
90
105
|
code=code,
|
nucliadb_utils/const.py
CHANGED
{nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb_utils
|
3
|
-
Version: 5.0.1.
|
3
|
+
Version: 5.0.1.post1116
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -24,8 +24,8 @@ Requires-Dist: PyNaCl
|
|
24
24
|
Requires-Dist: pyjwt>=2.4.0
|
25
25
|
Requires-Dist: memorylru>=1.1.2
|
26
26
|
Requires-Dist: mrflagly>=0.2.9
|
27
|
-
Requires-Dist: nucliadb-protos>=5.0.1.
|
28
|
-
Requires-Dist: nucliadb-telemetry>=5.0.1.
|
27
|
+
Requires-Dist: nucliadb-protos>=5.0.1.post1116
|
28
|
+
Requires-Dist: nucliadb-telemetry>=5.0.1.post1116
|
29
29
|
Provides-Extra: cache
|
30
30
|
Requires-Dist: redis>=4.3.4; extra == "cache"
|
31
31
|
Requires-Dist: orjson>=3.6.7; extra == "cache"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
nucliadb_utils/__init__.py,sha256=EvBCH1iTODe-AgXm48aj4kVUt_Std3PeL8QnwimR5wI,895
|
2
2
|
nucliadb_utils/asyncio_utils.py,sha256=h8Y-xpcFFRgNzaiIW0eidz7griAQa7ggbNk34-tAt2c,2888
|
3
3
|
nucliadb_utils/authentication.py,sha256=N__d2Ez3JHJv5asYK5TgUcIkKqcAC8ZTLlnfLhfSneM,5837
|
4
|
-
nucliadb_utils/const.py,sha256=
|
4
|
+
nucliadb_utils/const.py,sha256=AYtxOqOoyDXYzsca0UTXbt6ACZsgoyfItorybDGKHdc,2723
|
5
5
|
nucliadb_utils/debug.py,sha256=Q56Nx9Dp7V2ae3CU2H0ztaZcHTJXdlflPLKLeOPZ170,2436
|
6
6
|
nucliadb_utils/exceptions.py,sha256=y_3wk77WLVUtdo-5FtbBsdSkCtK_DsJkdWb5BoPn3qo,1094
|
7
|
-
nucliadb_utils/featureflagging.py,sha256=
|
7
|
+
nucliadb_utils/featureflagging.py,sha256=H_qW7nE2k5wS7mv1m5SXayuvDDhTHYPwqTfW5-eVzEI,3422
|
8
8
|
nucliadb_utils/grpc.py,sha256=apu0uePnkGHCAT7GRQ9YZfRYyFj26kJ440i8jitbM3U,3314
|
9
9
|
nucliadb_utils/helpers.py,sha256=nPw8yod3hP-pxq80VF8QC36s7ygSg0dBUdfI-LatvCs,1600
|
10
10
|
nucliadb_utils/indexing.py,sha256=Luaqcar3CySpdYOFp6Q9Fyr8ZYwhYhaKRHQ_VGL78f8,2318
|
@@ -19,7 +19,7 @@ nucliadb_utils/transaction.py,sha256=mwcI3aIHAvU5KOGqd_Uz_d1XQzXhk_-NWY8NqU1lfb0
|
|
19
19
|
nucliadb_utils/utilities.py,sha256=idajCm_4Sojh7b3HTkP0fTfG2Mb6PIB9xtMmcfB7Nl0,15758
|
20
20
|
nucliadb_utils/aiopynecone/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
21
21
|
nucliadb_utils/aiopynecone/client.py,sha256=3DGJuHXO9Vm83atMLD4fd2FTz8SAr8RvPCGU_bXH9Ho,22333
|
22
|
-
nucliadb_utils/aiopynecone/exceptions.py,sha256=
|
22
|
+
nucliadb_utils/aiopynecone/exceptions.py,sha256=yfUXIADRuhPb2rNynoFRlpQ6QINm1EkmvT_BbZ7dv8I,3536
|
23
23
|
nucliadb_utils/aiopynecone/models.py,sha256=ketK2IYLWiwFZ76rnJmwfcuopFJrCAtCUszdTSurm_Q,3236
|
24
24
|
nucliadb_utils/audit/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
25
25
|
nucliadb_utils/audit/audit.py,sha256=Tbi8poUP6BKZy4ZsaFaeTaQ1K5ys8GXym5ps389-XHE,2966
|
@@ -64,8 +64,8 @@ nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQ
|
|
64
64
|
nucliadb_utils/tests/local.py,sha256=7nuP8EFUAiA8ZH50R1iPV9EUXBySQxOanVm3Zht_e0g,1835
|
65
65
|
nucliadb_utils/tests/nats.py,sha256=xqpww4jZjTKY9oPGlJdDJG67L3FIBQsa9qDHxILR8r8,7687
|
66
66
|
nucliadb_utils/tests/s3.py,sha256=IdMxK_cNdSHLvO1u8BwsKFzD87Hk1MVPDZ57zx6h-rA,3656
|
67
|
-
nucliadb_utils-5.0.1.
|
68
|
-
nucliadb_utils-5.0.1.
|
69
|
-
nucliadb_utils-5.0.1.
|
70
|
-
nucliadb_utils-5.0.1.
|
71
|
-
nucliadb_utils-5.0.1.
|
67
|
+
nucliadb_utils-5.0.1.post1116.dist-info/METADATA,sha256=KpdqhX5ztjM8y5_ScL4v-NM9eAhMDLxbtJDEzeoXv6s,2071
|
68
|
+
nucliadb_utils-5.0.1.post1116.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
69
|
+
nucliadb_utils-5.0.1.post1116.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
70
|
+
nucliadb_utils-5.0.1.post1116.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
71
|
+
nucliadb_utils-5.0.1.post1116.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/top_level.txt
RENAMED
File without changes
|
{nucliadb_utils-5.0.1.post1114.dist-info → nucliadb_utils-5.0.1.post1116.dist-info}/zip-safe
RENAMED
File without changes
|