Skip to content

Commit be6f2f7

Browse files
Original issue: terminusdb/terminusdb-docs#213 ```diff documents = [{ '@type' : 'Person', 'name' : "Jim" }, { '@type' : 'Person', 'name' : "Jill" }] -results = client.insert_document(document) +results = client.insert_document(documents) ```
1 parent 7b0ba7b commit be6f2f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

schema/all_documents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@
10241024
"slug": "add-documents-with-python-client",
10251025
"body": {
10261026
"@type": "Body",
1027-
"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```"
1027+
"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(documents)\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```"
10281028
},
10291029
"seo_metadata": {
10301030
"@type": "SEOMetadata",

0 commit comments

Comments
 (0)