Pinecone clients
Official Pinecone clients provide convenient access to the Pinecone API.
Python client
See the Pinecone Python client documentation for full installation instructions, usage examples, and reference information.
Install
To install the newest version of the Python client, run the following command:
If you already have the Python client, run the following command:
To check your client version, run the following command:
Initialize
Once installed, you can import the library and then use an API key to initialize a client instance:
When creating an index, import the ServerlessSpec
or PodSpec
class as well:
Proxy configuration
If your network setup requires you to interact with Pinecone through a proxy, you will need to pass additional configuration using optional keyword parameters:
proxy_url
: The location of your proxy. This could be an HTTP or HTTPS URL depending on your proxy setup.proxy_headers
: Accepts a python dictionary which can be used to pass any custom headers required by your proxy. If your proxy is protected by authentication, use this parameter to pass basic authentication headers with a digest of your username and password. Themake_headers
utility fromurllib3
can be used to help construct the dictionary.ssl_ca_certs
: By default, the client will perform SSL certificate verification using the CA bundle maintained by Mozilla in thecertifi
package. If your proxy is using self-signed certicates, use this parameter to specify the path to the certificate (PEM format).ssl_verify
: SSL verification is enabled by default, but it is disabled when set toFalse
. It is not recommened to go into production with SSL verification disabled.
Node.js client
See the Pinecone Node.JS client documentation for full installation instructions, usage examples, and reference information.
Install
To install the newest version of the Node.js client, written in TypeScript, run the following command:
If you already have the Node.js client, run the following command:
To check your client version, run the following command:
Initialize
Once installed, you can import the library and then use an API key to initialize a client instance:
Java client
The Java client is under active development and should be considered unstable. Before a 1.0 release, there are no guarantees of backward compatibility between minor versions. See the Java client README for full installation instructions and usage examples.
Install
To install the newest version of the Java client:
-
Make sure you have at least Java 1.8 installed.
-
Add a dependency to the current module:
Alternately, you can download a standalone uberjar from the GitHub repository.
Initialize
Once installed, you can import the client and then use an API key to initialize a client instance:
Go client
The Go client is under active development and should be considered unstable. Before a 1.0 release, there are no guarantees of backward compatibility between minor versions. See the Go client README for full installation instructions and usage examples.
Install
To install the newest version of the Go client:
-
Make sure you have a Go version with modules support.
-
Add a dependency to the current module:
Initialize
Once installed, you can import the client and then use an API key to initialize a client instance:
Was this page helpful?