Skip to main content

Option 1: Weaviate Cloud (WCD)

Here, you will create a Weaviate Cloud (WCD) instance. WCD is a fully managed Weaviate instance that runs in the cloud. It simplifies the process of using Weaviate, as you don't have to worry about installation or maintenance.

Log in to the WCD Console

Go to the WCD Console and log in with your credentials, or sign up as required.

Create a Weaviate instance

Find the "Clusters" tab, and create a Sandbox cluster, which is free to use. This should take a few minutes.

Retrieve your Weaviate instance details

Once the instance is created, you will be able see its details selecting the cluster.

Retrieve its (REST) URL, and the API key. You may need to create a new API key here. If so, make sure to assign an admin role to the key.

You will need these details to connect to your Weaviate instance.

Further details

For more detailed instructions on creating a Weaviate Cloud (WCD) instance, refer to the WCD documentation.

Connect to your WCD instance

To connect to the Weaviate Cloud (WCD) instance, you need to use the cluster URL and the API key. You can find these details in the WCD Console.

Use the connect_to_weaviate_cloud function to connect to your WCD instance.

Some Weaviate modules can use inference APIs for vectorizing data or generative AI model integration. You can provide the API keys for these services to Weaviate at instantiation.

This course uses Cohere, so you can provide the Cohere API key to Weaviate through headers={"X-Cohere-Api-Key": <YOUR_KEY>}.

Putting it together, connect to Weaviate with code like this shown below:

import weaviate
import os

headers = {
"X-Cohere-Api-Key": os.getenv("COHERE_APIKEY")
} # Replace with your Cohere API key

client = weaviate.connect_to_weaviate_cloud(
cluster_url=os.getenv("WEAVIATE_URL"), # Replace with your WCD URL
auth_credentials=os.getenv("WEAVIATE_API_KEY"), # Replace with your WCD key
headers=headers,
)
❗️ Important

Use this snippet every time you connect to your Weaviate instance in this course. For brevity, this is shown as follows in the subsequent lessons:

client = weaviate.connect_to_weaviate_cloud(...)
What's next?

You are now set up with a Weaviate Cloud (WCD) instance to use with Python and the Weaviate Python client library. You can review the next lesson to see how to create a local Docker instance.


Or, skip to the subsequent lesson to see how to connect to Weaviate and verify the connection.

Login to track your progress