nucliadb-utils 5.0.1.post1007__py3-none-any.whl → 5.0.1.post1013__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/client.py +10 -2
- {nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/METADATA +3 -3
- {nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/RECORD +6 -6
- {nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/WHEEL +0 -0
- {nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/zip-safe +0 -0
@@ -89,21 +89,29 @@ class ControlPlane:
|
|
89
89
|
self.http_session = http_session
|
90
90
|
|
91
91
|
@pinecone_observer.wrap({"type": "create_index"})
|
92
|
-
async def create_index(
|
92
|
+
async def create_index(
|
93
|
+
self,
|
94
|
+
name: str,
|
95
|
+
dimension: int,
|
96
|
+
metric: str = "dotproduct",
|
97
|
+
serverless_cloud: Optional[dict[str, str]] = None,
|
98
|
+
) -> str:
|
93
99
|
"""
|
94
100
|
Create a new index in Pinecone. It can only create serverless indexes on the AWS us-east-1 region.
|
95
101
|
Params:
|
96
102
|
- `name`: The name of the index.
|
97
103
|
- `dimension`: The dimension of the vectors in the index.
|
98
104
|
- `metric`: The similarity metric to use. Default is "dotproduct".
|
105
|
+
- `serverless_cloud`: The serverless provider to use. Default is AWS us-east-1.
|
99
106
|
Returns:
|
100
107
|
- The index host to be used for data plane operations.
|
101
108
|
"""
|
109
|
+
serverless_cloud = serverless_cloud or {"cloud": "aws", "region": "us-east-1"}
|
102
110
|
payload = CreateIndexRequest(
|
103
111
|
name=name,
|
104
112
|
dimension=dimension,
|
105
113
|
metric=metric,
|
106
|
-
spec={"serverless":
|
114
|
+
spec={"serverless": serverless_cloud},
|
107
115
|
)
|
108
116
|
headers = {"Api-Key": self.api_key}
|
109
117
|
http_response = await self.http_session.post(
|
{nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.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.post1013
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -23,8 +23,8 @@ Requires-Dist: PyNaCl
|
|
23
23
|
Requires-Dist: pyjwt >=2.4.0
|
24
24
|
Requires-Dist: memorylru >=1.1.2
|
25
25
|
Requires-Dist: mrflagly
|
26
|
-
Requires-Dist: nucliadb-protos >=5.0.1.
|
27
|
-
Requires-Dist: nucliadb-telemetry >=5.0.1.
|
26
|
+
Requires-Dist: nucliadb-protos >=5.0.1.post1013
|
27
|
+
Requires-Dist: nucliadb-telemetry >=5.0.1.post1013
|
28
28
|
Provides-Extra: cache
|
29
29
|
Requires-Dist: redis >=4.3.4 ; extra == 'cache'
|
30
30
|
Requires-Dist: orjson >=3.6.7 ; extra == 'cache'
|
@@ -18,7 +18,7 @@ nucliadb_utils/store.py,sha256=kQ35HemE0v4_Qg6xVqNIJi8vSFAYQtwI3rDtMsNy62Y,890
|
|
18
18
|
nucliadb_utils/transaction.py,sha256=mwcI3aIHAvU5KOGqd_Uz_d1XQzXhk_-NWY8NqU1lfb0,7307
|
19
19
|
nucliadb_utils/utilities.py,sha256=idajCm_4Sojh7b3HTkP0fTfG2Mb6PIB9xtMmcfB7Nl0,15758
|
20
20
|
nucliadb_utils/aiopynecone/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
21
|
-
nucliadb_utils/aiopynecone/client.py,sha256=
|
21
|
+
nucliadb_utils/aiopynecone/client.py,sha256=N4aVWS0zUaAfKyQKxJ_0M-8p_j5vKxD0r-GL4pgxFKc,20319
|
22
22
|
nucliadb_utils/aiopynecone/exceptions.py,sha256=EEE0XoGs1zIB5yOJ_fy6yoG4uIb4cWIawYdJeNe4eDo,3012
|
23
23
|
nucliadb_utils/aiopynecone/models.py,sha256=tUugQ-ACQAyT-lhsfLwKAOgb6ilLchLwZfnRV7xwFck,3047
|
24
24
|
nucliadb_utils/audit/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
@@ -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.post1013.dist-info/METADATA,sha256=i53YHSGDW7xzH6vOWx2KNMbAGXnhZoTQlHK9YEqHHy4,2076
|
68
|
+
nucliadb_utils-5.0.1.post1013.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
69
|
+
nucliadb_utils-5.0.1.post1013.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
70
|
+
nucliadb_utils-5.0.1.post1013.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
71
|
+
nucliadb_utils-5.0.1.post1013.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/top_level.txt
RENAMED
File without changes
|
{nucliadb_utils-5.0.1.post1007.dist-info → nucliadb_utils-5.0.1.post1013.dist-info}/zip-safe
RENAMED
File without changes
|