message – Tools for creating messages to be sent to MongoDB

Tools for creating messages to be sent to MongoDB.


This module is for internal use and is generally not needed by application developers.

pymongo.message.delete(collection_name, spec, safe, last_error_args, opts, flags=0)

Get a delete message.

opts is a CodecOptions. flags is a bit vector that may contain the SingleRemove flag or not:

pymongo.message.get_more(collection_name, num_to_return, cursor_id)

Get a getMore message.

pymongo.message.insert(collection_name, docs, check_keys, safe, last_error_args, continue_on_error, opts)

Get an insert message.

Used by the Bulk API to insert into pre-2.6 servers. Collection.insert uses _do_batched_insert.


Get a killCursors message.

pymongo.message.query(options, collection_name, num_to_skip, num_to_return, query, field_selector, opts)

Get a query message.

pymongo.message.update(collection_name, upsert, multi, spec, doc, safe, last_error_args, check_keys, opts)

Get an update message.

Previous topic

errors – Exceptions raised by the pymongo package

Next topic

mongo_client – Tools for connecting to MongoDB

This Page