Skip to content

Instantly share code, notes, and snippets.

@laura-ham
Created March 31, 2021 07:35
Show Gist options
  • Save laura-ham/be24f13197fc37105097fd87be367844 to your computer and use it in GitHub Desktop.
Save laura-ham/be24f13197fc37105097fd87be367844 to your computer and use it in GitHub Desktop.
Create a Weaviate schema with a Wine class
import weaviate
client = weaviate.Client("http://localhost:8080")
class_obj = {
"class": "Wine",
"properties": [
{
"name": "title",
"dataType": ["text"]
},
{
"name": "description",
"dataType": ["text"]
}
]
}
new_class = client.schema.create_class(class_obj)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment