pymongo.collection
pymongo.ASCENDING
pymongo.DESCENDING
pymongo.GEO2D
pymongo.GEOHAYSTACK
pymongo.GEOSPHERE
pymongo.HASHED
pymongo.TEXT
pymongo.collection.ReturnDocument
BEFORE
AFTER
pymongo.collection.Collection(database, name, create=False, **kwargs)
c[name] || c.name
Get the name sub-collection of Collection
c.
Raises ~pymongo.errors.InvalidName
if an invalid collection name is used.
full_name
name
database
codec_options
read_preference
write_concern
read_concern
with_options
bulk_write
insert_one
insert_many
replace_one
update_one
update_many
delete_one
delete_many
aggregate
aggregate_raw_batches
watch
find(filter=None, projection=None, skip=0, limit=0, no_cursor_timeout=False, cursor_type=CursorType.NON_TAILABLE, sort=None, allow_partial_results=False, oplog_replay=False, modifiers=None, batch_size=0, manipulate=True, collation=None, hint=None, max_scan=None, max_time_ms=None, max=None, min=None, return_key=False, show_record_id=False, snapshot=False, comment=None, session=None, allow_disk_use=None)
find_raw_batches(filter=None, projection=None, skip=0, limit=0, no_cursor_timeout=False, cursor_type=CursorType.NON_TAILABLE, sort=None, allow_partial_results=False, oplog_replay=False, modifiers=None, batch_size=0, manipulate=True, collation=None, hint=None, max_scan=None, max_time_ms=None, max=None, min=None, return_key=False, show_record_id=False, snapshot=False, comment=None, session=None, allow_disk_use=None)
find_one(filter=None, args,*kwargs)
find_one_and_delete
find_one_and_replace(filter, replacement, projection=None, sort=None, return_document=ReturnDocument.BEFORE, hint=None, session=None, **kwargs)
find_one_and_update(filter, update, projection=None, sort=None, return_document=ReturnDocument.BEFORE, array_filters=None, hint=None, session=None, **kwargs)
count_documents
estimated_document_count
distinct
create_index
create_indexes
drop_index
drop_indexes
reindex
list_indexes
index_information
drop
rename
options
map_reduce
inline_map_reduce
parallel_scan
initialize_unordered_bulk_op
initialize_ordered_bulk_op
group
count
insert(doc_or_docs, manipulate=True, check_keys=True, continue_on_error=False, **kwargs)
save(to_save, manipulate=True, check_keys=True, **kwargs)
update(spec, document, upsert=False, manipulate=False, multi=False, check_keys=True, **kwargs)
remove(spec_or_id=None, multi=True, **kwargs)
find_and_modify
ensure_index