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

Constructor: _Snapshot(limit)

View In Hierarchy

Copy only bounded JSON-native containers before handing work to a thread.

Mutable caller data is detached before the request first yields control.

Method __init__ Initialize the byte and element budgets for the snapshot.
Method charge Consume part of the remaining snapshot budget.
Method copy Detach a JSON-native value within the size and nesting limits.
Method mapping Copy a JSON object and account for its keys and delimiters.
Instance Variable count Number of JSON values visited during the copy.
Instance Variable remaining Number of bytes left in the snapshot budget.
def __init__(self, limit: int): (source)

Initialize the byte and element budgets for the snapshot.

Parameters
limit:intMaximum byte count allowed for this operation.
Returns
NoneInitialize the remaining byte budget and reset the visited-value count.
def charge(self, size: int): (source)

Consume part of the remaining snapshot budget.

Parameters
size:intNumber of bytes to charge.
Returns
NoneDeduct the supplied number of bytes from the snapshot budget.
def copy(self, item: object, depth: int = 0) -> object: (source)

Detach a JSON-native value within the size and nesting limits.

Parameters
item:objectJSON value at the current nesting level.
depth:intCurrent nesting level, counted from the root.
Returns
objectDetached value with its JSON-native type preserved.
def mapping(self, value: dict, depth: int) -> dict: (source)

Copy a JSON object and account for its keys and delimiters.

Parameters
value:dictJSON object with string keys.
depth:intCurrent nesting level, counted from the root.
Returns
dictDetached JSON object.

Number of JSON values visited during the copy.

remaining: int = (source)

Number of bytes left in the snapshot budget.