zlmdb._types¶
Attributes¶
Charset from which to generate random key IDs. |
|
Classes¶
Arbitrary Python object values, serialized using Pickle protocol version 5. |
|
Functions¶
Generate a globally unique serial / product code of the form |
|
|
Deserialize a timestamp from big-endian byte order data. |
|
Serialize a timestamp in big-endian byte order. |
Module Contents¶
- CHARSET = '345679ACEFGHJKLMNPQRSTUVWXY'[source]¶
Charset from which to generate random key IDs.
Note
We take out the following 9 chars (leaving 27), because there is visual ambiguity: 0/O/D, 1/I, 8/B, 2/Z.
- class _OidKeysMixin[source]¶
Bases:
object- MAX_OID = 9007199254740992[source]¶
Valid OID are from the integer range [0, MAX_OID].
The upper bound 2**53 is chosen since it is the maximum integer that can be represented as a IEEE double such that all smaller integers are representable as well.
Hence, IDs can be safely used with languages that use IEEE double as their main (or only) number type (JavaScript, Lua, etc).
- class _Pickle5ValuesMixin[source]¶
Bases:
objectArbitrary Python object values, serialized using Pickle protocol version 5. Protocol version 5 was added in Python 3.8. It adds support for out-of-band data and speedup for in-band data.
See also
- _random_string()[source]¶
Generate a globally unique serial / product code of the form
u'YRAC-EL4X-FQQE-AW4T-WNUV-VN6T'. The generated value is cryptographically strong and has (at least) 114 bits of entropy.- Returns:
new random string key