File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,20 @@ const partitionKey: PartitionKey = new PartitionKeyBuilder()
395
395
// Create the item in the container
396
396
const { resource: document } = await container .items .create (item, partitionKey);
397
397
```
398
+
399
+ #### [ Python SDK] ( #tab/python )
400
+
401
+ For python, just make sure that values for all the fields in the partition key path are specified in the item definition.
402
+
403
+ ``` python
404
+ # specify values for all fields on partition key path
405
+ item_definition = {' id' : ' f7da01b0-090b-41d2-8416-dacae09fbb4a' ,
406
+ ' tenantId' : ' Microsoft' ,
407
+ ' userId' : ' 8411f20f-be3e-416a-a3e7-dcd5a3c1f28b' ,
408
+ ' sessionId' : ' 0000-11-0000-1111' }
409
+
410
+ item = container.create_item(body = item_definition)
411
+ ```
398
412
---
399
413
400
414
### Perform a key/value lookup (point read) of an item
You can’t perform that action at this time.
0 commit comments