suou.iding

ID (i.e. SIQ) utilities.

A SIQ is a 112-bit identifier whose bits are distributed like this:

tttttttt tttttttt tttttttt tttttttt tttttttt uuuuuuuu uuuuuuuu ssssssss dddddddd dddddddd dddddddd dddddddd nnnnnnnn nnqqqqqq

where: t = seconds since Jan 1, 1970, 00:00 UTC u = fraction seconds — accuracy down to 15 microseconds s = shard ID d = domain hash n = progressive number, implemented each time q = qualifier

Learn more: <https://yusur.moe/protocols/siq.html>

Functions

make_domain_hash(domain[, local_id])

Compute a domain hash for SIQ.

Classes

Siq

Representation of a SIQ as an integer.

SiqCache(generator, typ[, size, max_age])

Caching single-type bulk ID generator.

SiqFormatType(*values)

SiqGen(domain[, last_siq, local_id, shard_id])

Implement a SIS-compliant SIQ generator.

SiqType(*values)

Qualifiers for the SIQ.