Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 670 Bytes

File metadata and controls

20 lines (15 loc) · 670 Bytes
description
Add a schema to TerminusDB and TerminusCMS using the TerminusDB Python Client

Add a Schema

After you have imported the terminusdb_client, and created a client, and connected to a database you can create a schema.

Insert schema document(s)

You can update the schema by adding well-formed JSON schema documents:

schema = [{ '@type' : 'Class', '@id' : 'Country'},
          { '@type' : 'Class', '@id' : 'Person',
            'name' : 'xsd:string',
            'nationality' : 'Country'
          }]
results = client.insert_document(schema,graph_type="schema")