Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr CompareEq AttributeLoad NameLoad attr Num If CompareIn Str NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If CompareLt NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr BoolOpOr BoolOpAnd CompareEq NameLoad Num Num NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr NameLoad Raise Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Num handlers ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign NameStore BinOpAdd BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str NameLoad AttributeLoad NameLoad attr Raise ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign NameStore BinOpAdd BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise ExceptHandler type NameLoad name NameStore body If NameLoad body Assign NameStore BinOpAdd BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Str NameLoad AttributeLoad NameLoad attr Raise If NameLoad body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str AugAssignAdd AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore BinOpAdd BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Dict Str Str Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str NameLoad AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr NameLoad Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad BoolOpOr Call NameLoad AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Raise NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A CommandCursor class to iterate over command results. N/A datetime collections deque bson.py3compat integer_types pymongo helpers pymongo.errors AutoReconnect NotMasterError OperationFailure pymongo.message _CursorAddress _GetMore _convert_exception CommandCursor N/A object N/A N/A A cursor / iterator over command cursors.
     __init__ N/A N/A self collection cursor_info address retrieved N/A 0 N/A N/A Create a new command cursor.
         N/A N/A self __collection collection N/A N/A self __id N/A cursor_info N/A id N/A N/A self __address address N/A N/A self __data N/A deque N/A cursor_info N/A firstBatch N/A N/A self __retrieved retrieved N/A N/A self __batch_size 0 N/A N/A self __killed N/A N/A self __id 0 N/A N/A ns cursor_info N/A N/A N/A self __ns N/A cursor_info N/A ns N/A N/A N/A self __ns N/A collection full_name N/A __del__ N/A N/A self N/A N/A N/A N/A N/A self __id N/A N/A self __killed N/A N/A N/A N/A self __die N/A __die N/A N/A self N/A N/A N/A Closes this cursor.
         N/A N/A N/A self __id N/A N/A self __killed N/A N/A N/A N/A N/A N/A N/A self __collection database client close_cursor N/A self __id N/A _CursorAddress N/A self __address N/A self __ns N/A N/A self __killed True N/A close N/A N/A self N/A N/A N/A Explicitly close / kill this cursor. Required for PyPy, Jython and
        other Python implementations that don't use reference counting
        garbage collection.
         N/A N/A N/A self __die N/A batch_size N/A N/A self batch_size N/A N/A N/A Limits the number of documents returned in one batch. Each batch
        requires a round trip to the server. It can be adjusted to optimize
        performance and limit data transfer.

        .. note:: batch_size can not override MongoDB's internal limits on the
           amount of data it will return to the client in a single batch (i.e
           if you set batch size to 1,000,000,000, MongoDB will currently only
           return 4-16MB of results per batch).

        Raises :exc:`TypeError` if `batch_size` is not an integer.
        Raises :exc:`ValueError` if `batch_size` is less than ``0``.

        :Parameters:
          - `batch_size`: The size of each batch of results requested.
         N/A N/A N/A isinstance batch_size integer_types N/A N/A N/A TypeError batch_size must be an integer N/A N/A batch_size 0 N/A N/A N/A ValueError batch_size must be >= 0 N/A N/A self __batch_size N/A N/A N/A batch_size 1 2 batch_size N/A self N/A __send_message N/A N/A self operation N/A N/A N/A Send a getmore message and handle the response.
         N/A client N/A N/A N/A self __collection database client N/A listeners N/A client _event_listeners N/A publish N/A listeners enabled_for_commands N/A N/A N/A response N/A N/A client _send_message_with_response operation address N/A self __address N/A N/A N/A AutoReconnect N/A N/A N/A self __killed True N/A N/A cmd_duration N/A response duration N/A rqst_id N/A response request_id N/A from_command N/A response from_command N/A publish N/A N/A start N/A N/A N/A datetime datetime now N/A N/A N/A doc N/A N/A helpers _unpack_response N/A response data N/A self __id N/A N/A self __collection codec_options N/A from_command N/A N/A N/A N/A helpers _check_command_response N/A N/A doc N/A data N/A 0 N/A N/A N/A OperationFailure N/A exc N/A N/A N/A self __killed True N/A publish N/A N/A duration N/A N/A N/A N/A N/A datetime datetime now start cmd_duration N/A N/A N/A listeners publish_command_failure duration N/A exc details getMore rqst_id N/A self __address N/A N/A N/A NotMasterError N/A exc N/A N/A N/A self __killed True N/A publish N/A N/A duration N/A N/A N/A N/A N/A datetime datetime now start cmd_duration N/A N/A N/A listeners publish_command_failure duration N/A exc details getMore rqst_id N/A self __address N/A N/A N/A client _reset_server_and_request_check N/A self address N/A N/A N/A Exception N/A exc N/A N/A publish N/A N/A duration N/A N/A N/A N/A N/A datetime datetime now start cmd_duration N/A N/A N/A listeners publish_command_failure duration N/A _convert_exception exc getMore rqst_id N/A self __address N/A N/A from_command N/A N/A cursor N/A N/A N/A doc N/A data N/A 0 N/A cursor N/A documents N/A cursor N/A nextBatch N/A N/A self __id N/A cursor N/A id N/A N/A self __retrieved N/A len documents N/A N/A documents N/A doc N/A data N/A N/A self __id N/A doc N/A cursor_id N/A N/A self __retrieved N/A doc N/A number_returned N/A publish N/A N/A duration N/A N/A N/A N/A N/A datetime datetime now start cmd_duration N/A res N/A cursor ok N/A id ns nextBatch N/A self __id N/A N/A self __collection full_name documents 1 N/A N/A N/A listeners publish_command_success duration res getMore rqst_id N/A self __address N/A N/A N/A self __id 0 N/A N/A N/A self __killed True N/A N/A self __data N/A deque documents N/A _refresh N/A N/A self N/A N/A N/A Refreshes the cursor with more data from the server.

        Returns the length of self.__data after refresh. Will exit early if
        self.__data is already non-empty. Raises OperationFailure when the
        cursor cannot be refreshed due to an error on the query.
         N/A N/A N/A len N/A self __data N/A self __killed N/A N/A N/A len N/A self __data N/A N/A self __id N/A N/A N/A dbname collname N/A N/A N/A self __ns split . 1 N/A N/A N/A self __send_message N/A _GetMore dbname collname N/A self __batch_size N/A self __id N/A N/A self __collection codec_options N/A N/A N/A self __killed True N/A N/A len N/A self __data N/A alive N/A N/A self N/A N/A N/A Does this cursor have the potential to return more data?

        Even if :attr:`alive` is ``True``, :meth:`next` can raise
        :exc:`StopIteration`. Best to use a for loop::

            for doc in collection.aggregate(pipeline):
                print(doc)

        .. note:: :attr:`alive` can be True while iterating a cursor from
          a failed server. In this case :attr:`alive` will return False after
          :meth:`next` fails to retrieve the next batch of results from the
          server.
         N/A N/A bool N/A N/A len N/A self __data N/A N/A self __killed N/A property cursor_id N/A N/A self N/A N/A N/A Returns the id of the cursor. N/A N/A self __id N/A property address N/A N/A self N/A N/A N/A The (host, port) of the server used, or None.

        .. versionadded:: 3.0
         N/A N/A self __address N/A property __iter__ N/A N/A self N/A N/A N/A self N/A next N/A N/A self N/A N/A N/A Advance the cursor. N/A N/A N/A len N/A self __data N/A N/A self _refresh N/A N/A coll N/A self __collection N/A N/A N/A N/A coll database _fix_outgoing N/A N/A N/A self __data popleft coll N/A N/A StopIteration N/A N/A __next__ next __enter__ N/A N/A self N/A N/A N/A self N/A __exit__ N/A N/A self exc_type exc_val exc_tb N/A N/A N/A N/A N/A self __die N/A N/A