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)
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:object | The object to freeze. Can be a dict, list, or tuple. |
| Returns | |
object | A fully immutable object with preserved references. Non-container objects or MappingProxyType are returned unchanged. |
| Raises | |
ValueError | If a cycle consists entirely of lists or tuples, which cannot be represented by immutable tuples. Cycles through dictionaries retain their references through mapping proxies. |