mirror of
https://github.com/pinecone-io/examples.git
synced 2023-10-11 20:04:54 +03:00
change method for retrieving env vars - it threat detection
This commit is contained in:
@@ -112,9 +112,9 @@
|
||||
"import os\n",
|
||||
"\n",
|
||||
"# Load Pinecone API key\n",
|
||||
"api_key = os.getenv('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
|
||||
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
|
||||
"# Set Pinecone environment/region - find next to API key in console\n",
|
||||
"env = os.getenv('PINECONE_ENVIRONMENT') or 'PINECONE_ENVIRONMENT'\n",
|
||||
"env = os.environ.get('PINECONE_ENVIRONMENT') or 'PINECONE_ENVIRONMENT'\n",
|
||||
"\n",
|
||||
"pinecone.init(api_key=api_key, environment=env)"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user