Skip to content

Instantly share code, notes, and snippets.

@bobvanluijt
Created March 26, 2023 17:28
Show Gist options
  • Save bobvanluijt/3e4df9b581f78d4842c1ac588ad0b883 to your computer and use it in GitHub Desktop.
Save bobvanluijt/3e4df9b581f78d4842c1ac588ad0b883 to your computer and use it in GitHub Desktop.
Connect to Weaviate using an API-key using Python
import weaviate
# Set the Weaviate URL
url = "https://your-cluster.weaviate.network"
# Create a secret based on the API key
my_secret_key = weaviate.AuthApiKey(api_key="4jne...9me1")
# Create client objects
client = weaviate.Client(url, auth_client_secret=my_secret_key)
# Run a command
meta_info = client.get_meta()
print(meta_info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment