ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class FreezeThaw: (source)

View In Hierarchy

Convert nested mutable structures to immutable snapshots and back.

Static Method freeze Convert mutable containers to immutable equivalents recursively.
Static Method thaw Recursively convert frozen containers to mutable equivalents.

Convert mutable containers to immutable equivalents recursively.

Parameters
obj:objectThe object to freeze. Can be a dict, list, or tuple.
Returns
objectA fully immutable object with preserved references. Non-container objects or MappingProxyType are returned unchanged.
Raises
ValueErrorIf a cycle consists entirely of lists or tuples, which cannot be represented by immutable tuples. Cycles through dictionaries retain their references through mapping proxies.

Recursively convert frozen containers to mutable equivalents.

Parameters
obj:objectThe object to thaw. Can be a MappingProxyType, dict, list, or tuple.
Returns
objectA fully mutable object with preserved references. Non-container objects are returned unchanged.