Skip to content

Validation

Validation helpers from annnet.utils.validation.

annnet.utils.validation

Functions

canonicalize
canonicalize(obj)

Convert an object into an order-independent JSON-serializable structure.

obj_canonicalized_hash
obj_canonicalized_hash(obj)

Return a stable SHA256 hash for a canonicalized object.

unique_iter
unique_iter(iterable, key=None)

Yield unique items from an iterable while preserving order.