class motor.motor_tornado.MotorChangeStream(target, pipeline, full_document, resume_after, max_await_time_ms, batch_size, collation, start_at_operation_time, session)

A change stream cursor.

Should not be called directly by application developers. See watch() for example usage.

See also

The MongoDB documentation on


coroutine close()

Close this change stream.

Stops any “async for” loops using this change stream.

coroutine next()

Advance the cursor.

This method blocks until the next change document is returned or an unrecoverable error is raised.

Raises StopAsyncIteration if this change stream is closed.

You can iterate the change stream by calling await repeatedly, or with an “async for” loop:

async for change in