Module ImportFrom alias alias Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias Assign NameStore Dict FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body If UnaryOpNot Call NameLoad NameLoad body Raise NameLoad Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad BoolOpOr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Return Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assert Call NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore ListComp IfExp CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad ListComp TupleLoad NameLoad IfExp CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If NameLoad body Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assert Call NameLoad NameLoad Str For NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad body For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad orelse If CompareIs Call NameLoad NameLoad Str NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Delete AttributeDel NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list
N/A __future__ unicode_literals absolute_import N/A Dynamic class-creation for Motor. N/A inspect N/A functools N/A greenlet pymongo.cursor Cursor N/A motor_py3_compat motor_common callback_type_error check_deprecated_kwargs mangle_delegate_name N/A _class_cache N/A asynchronize N/A N/A motor_class framework sync_method has_write_concern doc N/A None N/A N/A Decorate `sync_method` so it accepts a callback or returns a Future.

    The method runs on a child greenlet and calls the callback or resolves
    the Future when the greenlet completes.

    :Parameters:
     - `motor_class`:       Motor class being created, e.g. MotorClient.
     - `framework`:         An asynchronous framework
     - `sync_method`:       Unbound method of pymongo Collection, Database,
                            MongoClient, etc.
     - `has_write_concern`: Whether the method accepts getLastError options
     - `doc`:               Optionally override sync_method's docstring
     method N/A N/A self N/A args kwargs N/A N/A N/A check_deprecated_kwargs kwargs N/A loop N/A N/A self get_io_loop N/A callback N/A N/A kwargs pop callback None N/A callback N/A N/A N/A N/A callable callback N/A N/A callback_type_error N/A future None N/A N/A future N/A N/A framework get_future N/A N/A self get_io_loop call_method N/A N/A N/A N/A N/A N/A N/A result N/A sync_method N/A self delegate args kwargs N/A callback N/A N/A N/A N/A framework call_soon loop N/A N/A functools partial callback result None N/A N/A N/A N/A framework call_soon loop N/A N/A functools partial N/A future set_result result N/A N/A N/A Exception N/A e N/A N/A callback N/A N/A N/A N/A framework call_soon loop N/A N/A functools partial callback None e N/A N/A N/A N/A framework call_soon loop N/A N/A functools partial N/A future set_exception e N/A N/A N/A N/A N/A N/A greenlet greenlet call_method switch N/A future N/A N/A N/A functools wraps sync_method N/A N/A method is_async_method True N/A N/A method has_write_concern has_write_concern N/A name N/A sync_method __name__ N/A N/A method pymongo_method_name N/A mangle_delegate_name motor_class name N/A N/A doc None N/A N/A N/A method __doc__ doc N/A method N/A N/A _coro_token N/A object motor_coroutine N/A N/A f N/A N/A N/A Used by Motor classes to mark functions as coroutines.

    create_class_with_framework will decorate the function with a framework-
    specific coroutine decorator, like asyncio.coroutine or Tornado's
    gen.coroutine.

    You cannot return a value from a motor_coroutine, the syntax differences
    between Tornado on Python 2 and asyncio with Python 3.5 are impossible to
    bridge.
     N/A N/A f _is_motor_coroutine _coro_token N/A f N/A coroutine_annotation N/A N/A f N/A N/A N/A In docs, annotate a function that returns a Future with 'coroutine'.

    Unlike @motor_coroutine, this doesn't affect behavior.
     N/A N/A f coroutine_annotation True N/A f N/A MotorAttributeFactory N/A object N/A N/A Used by Motor classes to mark attributes that delegate in some way to
    PyMongo. At module import time, each Motor class is created, and MotorMeta
    calls create_attribute() for each attr to create the final class attribute.
     __init__ N/A N/A self doc N/A None N/A N/A N/A self doc doc N/A create_attribute N/A N/A self cls attr_name N/A N/A N/A NotImplementedError N/A N/A Async N/A MotorAttributeFactory N/A __init__ N/A N/A self attr_name has_write_concern doc N/A None N/A N/A A descriptor that wraps a PyMongo method, such as insert or remove,
        and returns an asynchronous version of the method, which accepts a
        callback or returns a Future.

        :Parameters:
         - `attr_name`: The name of the attribute on the PyMongo class, if
           different from attribute on the Motor class
         - `has_write_concern`: Whether the method accepts getLastError options
         N/A N/A N/A N/A super Async self __init__ doc N/A N/A self attr_name attr_name N/A N/A self has_write_concern has_write_concern N/A create_attribute N/A N/A self cls attr_name N/A N/A N/A name N/A mangle_delegate_name cls N/A N/A self attr_name attr_name N/A method N/A getattr N/A cls __delegate_class__ name N/A N/A asynchronize motor_class cls framework N/A cls _framework sync_method method has_write_concern N/A self has_write_concern doc N/A self doc N/A wrap N/A N/A self original_class N/A N/A N/A N/A WrapAsync self original_class N/A unwrap N/A N/A self class_name N/A N/A N/A N/A Unwrap self class_name N/A N/A WrapBase N/A MotorAttributeFactory N/A __init__ N/A N/A self prop doc N/A None N/A N/A N/A N/A N/A super WrapBase self __init__ doc N/A N/A self property prop N/A N/A WrapAsync N/A WrapBase N/A __init__ N/A N/A self prop original_class N/A N/A N/A Like Async, but before it executes the callback or resolves the
        Future, checks if result is a PyMongo class and wraps it in a Motor
        class. E.g., Motor's map_reduce should pass a MotorCollection instead
        of a PyMongo Collection to the Future. Uses the wrap() method on the
        owner object to do the actual wrapping. E.g.,
        Database.create_collection returns a Collection, so MotorDatabase has:

        create_collection = AsyncCommand().wrap(Collection)

        Once Database.create_collection is done, Motor calls
        MotorDatabase.wrap() on its result, transforming the result from
        Collection to MotorCollection, which is passed to the callback or
        Future.

        :Parameters:
        - `prop`: An Async, the async method to call before wrapping its result
          in a Motor class.
        - `original_class`: A PyMongo class to be wrapped.
         N/A N/A N/A N/A super WrapAsync self __init__ prop N/A N/A self original_class original_class N/A create_attribute N/A N/A self cls attr_name N/A N/A N/A async_method N/A N/A N/A self property create_attribute cls attr_name N/A original_class N/A self original_class N/A wrapper N/A N/A N/A cls _framework pymongo_class_wrapper async_method original_class N/A N/A self doc N/A N/A N/A wrapper __doc__ N/A self doc N/A wrapper N/A N/A Unwrap N/A WrapBase N/A __init__ N/A N/A self prop motor_class_name N/A N/A N/A A descriptor that checks if arguments are Motor classes and unwraps
        them. E.g., Motor's drop_database takes a MotorDatabase, unwraps it,
        and passes a PyMongo Database instead.

        :Parameters:
        - `prop`: An Async, the async method to call with unwrapped arguments.
        - `motor_class_name`: Like 'MotorDatabase' or 'MotorCollection'.
         N/A N/A N/A N/A super Unwrap self __init__ prop N/A N/A isinstance motor_class_name N/A motor_py3_compat text_type N/A N/A self motor_class_name motor_class_name N/A create_attribute N/A N/A self cls attr_name N/A N/A N/A f N/A N/A N/A self property create_attribute cls attr_name N/A name N/A self motor_class_name _f N/A N/A self N/A args kwargs N/A N/A unwrapped_args N/A N/A N/A N/A N/A obj __class__ __name__ name N/A obj delegate obj N/A obj args N/A unwrapped_kwargs N/A dict N/A N/A key N/A N/A N/A N/A obj __class__ __name__ name N/A obj delegate obj N/A N/A key obj N/A N/A kwargs items N/A N/A f self unwrapped_args unwrapped_kwargs N/A N/A N/A functools wraps f N/A N/A self doc N/A N/A N/A _f __doc__ N/A self doc N/A _f N/A N/A AsyncRead N/A Async N/A __init__ N/A N/A self attr_name doc N/A None None N/A N/A A descriptor that wraps a PyMongo read method like find_one() that
        returns a Future.
         N/A N/A N/A Async __init__ self attr_name attr_name has_write_concern False doc doc N/A N/A AsyncWrite N/A Async N/A __init__ N/A N/A self attr_name doc N/A None None N/A N/A A descriptor that wraps a PyMongo write method like update() that
        accepts getLastError options and returns a Future.
         N/A N/A N/A Async __init__ self attr_name attr_name has_write_concern True doc doc N/A N/A AsyncCommand N/A Async N/A __init__ N/A N/A self attr_name doc N/A None None N/A N/A A descriptor that wraps a PyMongo command like copy_database() that
        returns a Future and does not accept getLastError options.
         N/A N/A N/A Async __init__ self attr_name attr_name has_write_concern False doc doc N/A N/A ReadOnlyPropertyDescriptor N/A object N/A __init__ N/A N/A self attr_name doc N/A None N/A N/A N/A self attr_name attr_name N/A doc N/A N/A N/A self __doc__ doc N/A __get__ N/A N/A self obj objtype N/A N/A N/A obj N/A N/A N/A getattr N/A obj delegate N/A self attr_name N/A N/A N/A getattr N/A objtype __delegate_class__ N/A self attr_name N/A __set__ N/A N/A self obj val N/A N/A N/A AttributeError N/A N/A ReadOnlyProperty N/A MotorAttributeFactory N/A N/A Creates a readonly attribute on the wrapped PyMongo object create_attribute N/A N/A self cls attr_name N/A N/A N/A N/A ReadOnlyPropertyDescriptor attr_name N/A self doc N/A N/A DelegateMethod N/A ReadOnlyProperty N/A N/A A method on the wrapped PyMongo object that does no I/O and can be called
    synchronously N/A ReadWritePropertyDescriptor N/A ReadOnlyPropertyDescriptor N/A __set__ N/A N/A self obj val N/A N/A N/A N/A setattr N/A obj delegate N/A self attr_name val N/A N/A ReadWriteProperty N/A MotorAttributeFactory N/A N/A Creates a mutable attribute on the wrapped PyMongo object create_attribute N/A N/A self cls attr_name N/A N/A N/A N/A ReadWritePropertyDescriptor attr_name N/A self doc N/A N/A MotorCursorChainingMethod N/A MotorAttributeFactory N/A create_attribute N/A N/A self cls attr_name N/A N/A N/A cursor_method N/A getattr Cursor attr_name return_clone N/A N/A self N/A args kwargs N/A N/A N/A cursor_method N/A self delegate args kwargs N/A self N/A N/A N/A functools wraps cursor_method N/A N/A return_clone is_motorcursor_chaining_method True N/A N/A return_clone pymongo_method_name attr_name N/A N/A self doc N/A N/A N/A return_clone __doc__ N/A self doc N/A return_clone N/A N/A create_class_with_framework N/A N/A cls framework module_name N/A N/A N/A motor_class_name N/A cls __motor_class_name__ N/A cache_key N/A cls motor_class_name framework N/A cached_class N/A N/A _class_cache get cache_key N/A cached_class N/A N/A cached_class N/A new_class N/A type N/A str motor_class_name N/A cls __bases__ N/A N/A N/A cls __dict__ copy N/A N/A new_class __module__ module_name N/A N/A new_class _framework framework N/A N/A hasattr new_class __delegate_class__ N/A base N/A reversed N/A N/A inspect getmro cls N/A N/A N/A name attr N/A N/A N/A base __dict__ items N/A N/A N/A isinstance attr MotorAttributeFactory N/A N/A new_class_attr N/A N/A attr create_attribute new_class name N/A N/A setattr new_class name new_class_attr N/A N/A N/A N/A getattr attr _is_motor_coroutine None _coro_token N/A N/A coro N/A N/A framework coroutine attr N/A N/A coro _is_motor_coroutine N/A N/A coro coroutine_annotation True N/A N/A setattr new_class name coro N/A N/A _class_cache N/A cache_key new_class N/A new_class N/A