- "value": "After you have imported the `terminusdb_client`, and [created a client](/docs/connect-with-python-client/), [connected to a database](/docs/connect-with-python-client/), and [added a schema](/docs/add-a-schema-with-the-python-client/), you can then use this client to insert a document that conforms to the schema.\n\n## Insert a document\n\nTo insert a document, you should use `insert_document`:\n\n```\ndocument = { '@type' : 'Person', 'name' : \"Jim\" }\nresults = client.insert_document(document)\n```\n\n## Insert multiple documents\n\nTo insert multiple documents you can also invoke `insert_document`:\n\n```\ndocuments = [{ '@type' : 'Person', 'name' : \"Jim\" },\n { '@type' : 'Person', 'name' : \"Jill\" }]\nresults = client.insert_document(document)\n```\n\n## Insert schema document(s)\n\nAdditionally, you can update the schema itself by adding schema documents:\n\n```\nschema = { '@type' : 'Class', '@id' : 'Person', 'name' : 'xsd:string'}\nresults = client.insert_document(schema,graph_type=\"schema\")\n```"
0 commit comments