API Documentation¶
The PyMongo distribution contains three top-level packages for
interacting with MongoDB. bson is an implementation of the
BSON format, pymongo is a
full-featured driver for MongoDB, and gridfs is a set of tools
for working with the GridFS storage
specification.
bson– BSON (Binary JSON) Encoding and DecodingBSONdecode()decode_all()decode_file_iter()decode_iter()encode()gen_list_name()has_c()is_valid()binary– Tools for representing binary data to be stored in MongoDBcode– Tools for representing JavaScript codecodec_options– Tools for specifying BSON codec optionsdatetime_ms– Support for BSON UTC Datetimedbref– Tools for manipulating DBRefs (references to documents stored in MongoDB)decimal128– Support for BSON Decimal128errors– Exceptions raised by thebsonpackage