Skip to content

Commit aaebc1e

Browse files
committed
initialize client
1 parent 2b49082 commit aaebc1e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

learn/experimental/merge-namespaces/merge-namespaces.ipynb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,40 @@
2222
"\n",
2323
"Please note this code is **experimental** and not guaranteed to work by Pinecone. Test thoroughly before using in production."
2424
]
25+
},
26+
{
27+
"cell_type": "code",
28+
"execution_count": null,
29+
"metadata": {
30+
"vscode": {
31+
"languageId": "plaintext"
32+
}
33+
},
34+
"outputs": [],
35+
"source": [
36+
"%pip install -qU pinecone-notebooks pinecone-client[grpc]"
37+
]
38+
},
39+
{
40+
"cell_type": "code",
41+
"execution_count": null,
42+
"metadata": {
43+
"vscode": {
44+
"languageId": "plaintext"
45+
}
46+
},
47+
"outputs": [],
48+
"source": [
49+
"from pinecone.grpc import PineconeGRPC as Pinecone\n",
50+
"from pinecone import ServerlessSpec\n",
51+
"import os\n",
52+
"\n",
53+
"# The generated API key is available in the PINECONE_API_KEY environment variable\n",
54+
"api_key = os.environ.get('PINECONE_API_KEY')\n",
55+
"\n",
56+
"# Use the API key to initialize the Pinecone client\n",
57+
"pc = Pinecone(api_key=api_key)"
58+
]
2559
}
2660
],
2761
"metadata": {

0 commit comments

Comments
 (0)