timestamp – Tools for representing MongoDB internal Timestamps

    class bson.timestamp.Timestamp(time, inc)

    Create a new Timestamp.

    This class is only for use with the MongoDB opLog. If you need to store a regular timestamp, please use a .

    Raises TypeError if time is not an instance of :class: int or , or inc is not an instance of int. Raises if time or inc is not in [0, 2**32).

      • inc: the incrementing counter

    • property inc

      Get the inc portion of this Timestamp.