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 Serializer: (source)

View In Hierarchy

Undocumented

Static Method dumps Serialize an object to a JSON-formatted string.
Static Method dumpToFile Write serialized data to a file atomically.
Static Method loadFromFile Load and deserialize data from a file.
Static Method loads Deserialize a JSON-formatted string to a Python object.
def dumps(data: Any, indent: int | None = None) -> str: (source)

Serialize an object to a JSON-formatted string.

Parameters
data:AnyThe object to serialize.
indent:int or None, optionalNumber of spaces for indentation in the output JSON string.
Returns
strThe JSON-formatted string representing the serialized object.
def dumpToFile(data: Any, file_path: Path): (source)

Write serialized data to a file atomically.

Parameters
data:AnyThe object to serialize and write.
file_path:PathThe file path where the serialized data will be written.
Returns
NoneThis method does not return a value.
Raises
OSErrorIf the payload cannot be staged or renamed into place.
def loadFromFile(file_path: Path) -> Any: (source)

Load and deserialize data from a file.

Parameters
file_path:PathPath to the file from which to load and deserialize data.
Returns
AnyThe deserialized Python object, or None if the file does not exist or is empty.
def loads(raw: str | bytes) -> Any: (source)

Deserialize a JSON-formatted string to a Python object.

Parameters
raw:strJSON-formatted string to deserialize.
Returns
AnyThe deserialized Python object.