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.
Read a service contract's signatures without importing application modules.
| Class | _ |
Use qualified imports so inherited methods cannot shadow each other's types. |
| Class | _ |
Names and class declarations visible in a Python module. |
| Function | _bind |
Propagate type arguments to methods inherited from a specialized base. |
| Function | _bind |
Replace the service receiver, preserving caller-supplied keyword names. |
| Function | _declarations |
Include imports guarded by TYPE_CHECKING or version checks. |
| Function | _declared |
Select the public service methods and their overloads. |
| Function | _load |
Find source directly, including packages whose initializers have side effects. |
| Function | _parameters |
List parameters declared with Python generics or the Generic base. |
| Function | _qualified |
Validate the module and class components before locating source files. |
| Function | _signature |
Preserve parameter kinds, overloads, defaults and coroutine behavior. |
| Function | interface |
Generate typing declarations for the contract identified by module and class. |
| Constant | _TYPE |
Type parameter nodes supported in a Python generic declaration. |
| Type Alias | |
Syntax node for a synchronous or asynchronous service method. |
type, definition: ast.ClassDef, annotations: _Annotations, arguments: dict[ type, list[ ast.expr]], bases: list[ tuple[ type, ast.expr]]):
(source)
¶
Propagate type arguments to methods inherited from a specialized base.
| Parameters | |
marker:type | Class representing this position in the service hierarchy. |
definition:ast.ClassDef | Source declaration for the current class. |
annotations:_Annotations | Context receiving the class's type substitutions. |
arguments:dict[ | Specialized type arguments indexed by hierarchy marker. |
bases:list[ | Parent markers paired with the source expressions for those bases. |
| Returns | |
None | Record substitutions for this class and its generic parents. |
Method, annotations: _Annotations, decorators: set[ str]) -> tuple[ ast.arg | None, ...]:
(source)
¶
Replace the service receiver, preserving caller-supplied keyword names.
| Parameters | |
node:Method | Copy of the service method whose receiver will be replaced. |
annotations:_Annotations | Context that tracks the receiver's type parameter. |
decorators:set[ | Names of the decorators on the service method. |
| Returns | |
tuple | Original caller-supplied parameters, including variadic positions. |
Include imports guarded by TYPE_CHECKING or version checks.
| Parameters | |
body:list[ | Statements in the module or class being inspected. |
| Yields | |
ast.stmt | Each statement, including declarations inside conditional blocks. |
_Module, definition: ast.ClassDef, annotations: _Annotations) -> Iterator[ tuple[ str, list[ str]]]:
(source)
¶
Select the public service methods and their overloads.
| Parameters | |
module:_Module | Module containing the class definition. |
definition:ast.ClassDef | Class providing the members to publish on the facade. |
annotations:_Annotations | Context used to render member types and imports. |
| Yields | |
tuple | Public member name and the stub declarations for that member. |
List parameters declared with Python generics or the Generic base.
| Parameters | |
definition:ast.ClassDef | Class whose generic parameters are being inspected. |
module:_Module | Module used to resolve imported generic base classes. |
| Returns | |
list[str] | Type parameter names in declaration order. |
Preserve parameter kinds, overloads, defaults and coroutine behavior.
| Parameters | |
method:Method | Service method whose declaration is being copied. |
annotations:_Annotations | Context for resolving parameter and return annotations. |
decorators:set[ | Names of decorators on the original declaration. |
| Returns | |
str | Python stub declaration for the facade member. |
Generate typing declarations for the contract identified by module and class.
| Parameters | |
contract:str | None | Qualified service class name, or None to generate an empty stub. |
directory:Path | Application root searched before the interpreter's import paths. |
| Returns | |
dict[str, str] | Import and member replacements for the facade interface template. |
Type parameter nodes supported in a Python generic declaration.
| Value |
|
Syntax node for a synchronous or asynchronous service method.
| Value |
|