Created
March 31, 2021 07:35
-
-
Save laura-ham/be24f13197fc37105097fd87be367844 to your computer and use it in GitHub Desktop.
Create a Weaviate schema with a Wine class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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