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

Use qualified imports so inherited methods cannot shadow each other's types.

Method __init__ Initialize the context for copying a service annotation into a facade.
Method _attribute Resolve a dotted attribute and register any needed submodule import.
Method _expression Transform an expression while preserving its syntax category.
Method _name Resolve an annotation identifier in the current type scope.
Method _subscript Resolve the arguments of a parameterized type.
Method annotation Resolve a quoted forward reference or an ordinary annotation.
Method bindClass Resolve nested declaration names against their declaring class.
Method visit Rewrite annotation references for use outside the service module.
Instance Variable aliases Generated import aliases and the qualified names they represent.
Instance Variable bindings Type arguments supplied by a specialization of the declaring class.
Instance Variable class_names Qualified references to nested classes and type aliases.
Instance Variable contract Qualified service class substituted for receiver-dependent types.
Instance Variable imports Import statements accumulated for the generated stub.
Instance Variable module Module in which the original annotation was written.
Instance Variable parameters Type parameters bound by the current method.
Instance Variable receiver_parameter Type parameter that represents the service receiver, when present.
def __init__(self, module: _Module, imports: set[str], contract: str, aliases: dict[str, str]): (source)

Initialize the context for copying a service annotation into a facade.

Parameters
module:_ModuleSource module of the service declaration.
imports:set[str]Import statements shared by the generated declarations.
contract:strQualified service class used for receiver-dependent return types.
aliases:dict[str, str]Existing import aliases shared by inherited declarations.
Returns
NonePrepare name resolution for the current declaration.
def _attribute(self, node: ast.Attribute) -> ast.expr: (source)

Resolve a dotted attribute and register any needed submodule import.

Parameters
node:ast.AttributeAttribute reference from a service annotation.
Returns
ast.exprExpression that names the same attribute in the generated stub.
def _expression(self, node: ast.expr) -> ast.expr: (source)

Transform an expression while preserving its syntax category.

Parameters
node:ast.exprExpression to visit during annotation resolution.
Returns
ast.exprTransformed annotation or metadata expression.
def _name(self, node: ast.Name) -> ast.expr: (source)

Resolve an annotation identifier in the current type scope.

Parameters
node:ast.NameUnqualified name from a service annotation.
Returns
ast.exprReference to a built-in, type parameter or importable service type.
def _subscript(self, node: ast.Subscript) -> ast.expr: (source)

Resolve the arguments of a parameterized type.

Parameters
node:ast.SubscriptType expression with arguments inside square brackets.
Returns
ast.exprQualified type expression preserving literal values and metadata.
def annotation(self, value: ast.expr) -> ast.expr:
def annotation(self, value: None):
(source)

Resolve a quoted forward reference or an ordinary annotation.

Parameters
value:ast.expr | NoneAnnotation expression, or None for an unannotated position.
Returns
ast.expr or NoneResolved expression, or None if the source omitted the annotation.
def bindClass(self, definition: ast.ClassDef): (source)

Resolve nested declaration names against their declaring class.

Parameters
definition:ast.ClassDefClass whose nested types may appear in method signatures.
Returns
NoneRecord the qualified names of its nested classes and type aliases.
def visit(self, node: ast.AST) -> ast.AST: (source)

Rewrite annotation references for use outside the service module.

Parameters
node:ast.ASTSyntax node from the original annotation.
Returns
ast.ASTTransformed node with names resolved in their original context.

Generated import aliases and the qualified names they represent.

bindings: dict[str, ast.expr] = (source)

Type arguments supplied by a specialization of the declaring class.

class_names: dict[str, str] = (source)

Qualified references to nested classes and type aliases.

contract = (source)

Qualified service class substituted for receiver-dependent types.

Import statements accumulated for the generated stub.

Module in which the original annotation was written.

parameters: set[str] = (source)

Type parameters bound by the current method.

receiver_parameter: str | None = (source)

Type parameter that represents the service receiver, when present.