int64 – Tools for representing BSON int64

New in version 3.0.

A BSON wrapper for long (int in python3)

class bson.int64.Int64

Representation of the BSON int64 type.

This is necessary because every integral number is an int in Python 3. Small integral numbers are encoded to BSON int32 by default, but Int64 numbers will always be encoded to BSON int64.

Parameters:
  • value: the numeric value to represent

Previous topic

errors – Exceptions raised by the bson package

Next topic

json_util – Tools for using Python’s json module with BSON documents

This Page