- Tutorials >
- Bulk Operations
Bulk Operations¶
On this page
The bulk write API sends a list of write operations to the server in
one method call. Execution order of the operations is guaranteed if
you pass in the ordered
option.
The bulk_write
method takes three arguments:
- A list of operations.
- The
ordered
option with a boolean. Defaults totrue
. - A write concern option. Defaults to the collection’s write concern.
Valid bulk write operations are the following:
insert_one¶
delete_one¶
delete_many¶
replace_one¶
update_one¶
update_many¶
The following example shows how to pass operations
to the bulk_write
method.