These steps will get you started with Pinecone Teams. If you are interested in Pinecone Enterprise, contact us to request a demo.
1. Get an Early Access API key
Early access for Pinecone Teams is currently available for free. Complete this form to request an API key.
2. Install the lightweight python client
Once you have your API key, you’re ready to install and configure the lightweight python client.
pip install pinecone-client
3. Import Pinecone and set your API key
import pinecone
pinecone.init(api_key="YOUR_API_KEY")
4. Load your data
Here we’ll use some synthetic data for illustration.
import numpy as np
items = list(enumerate(np.random.randn(1000, 128)))
queries = np.random.randn(100, 128)
5. Define ingress paths
Define arbitrary pre-processing steps (DAGs) to transform inputs and outputs.
graph = pinecone.graph.IndexGraph()
# you can do things like
# graph.add_read_preprocessor('my_item_transformer_image_uri')
# graph.add_write_preprocessor('my_query_transformer_image_uri')
# graph.add_postprocessor('my_postprocessor_image_uri')
6. Start the service
Start the live service. Pinecone will run it on a managed, distributed container cluster.
pinecone.service.deploy(service_name="hello-pinecone", graph=graph)
7. Connect to your live service
conn = pinecone.connector.connect("hello-pinecone")
8. Add data
Data is transformed into high-dimensional vectors using the pre-processors defined in Step 5, and the index is updated within 100ms.
acks = conn.upsert(items=items).collect()
9. Query the database
Find similar or top-ranking items in milliseconds.
results = conn.query(queries=queries).collect()
What’s next? Read the documentation or contact support@pinecone.io with questions.