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 ReflectionAbstract(IReflectionAbstract): (source)
Constructor: ReflectionAbstract(abstract)
Undocumented
| Method | __contains__ |
Return whether a cache key exists. |
| Method | __delitem__ |
Remove a key from the cache. |
| Method | __getitem__ |
Return the cached value for a key. |
| Method | __init__ |
Initialize the reflector for an abstract base class. |
| Method | __setitem__ |
Store a value in the cache. |
| Method | _classify |
Classify a regular callable by visibility and coroutine type. |
| Method | _classify |
Classify a class method into reflection buckets. |
| Method | _classify |
Classify a non-callable attribute into visibility buckets. |
| Method | _classify |
Classify a property name into visibility-specific buckets. |
| Method | _classify |
Classify a static method by visibility and coroutine status. |
| Method | _commit |
Persist classified attribute buckets into the instance cache. |
| Method | _commit |
Persist classified method and property buckets into the instance cache. |
| Method | _ensure |
Ensure class members are scanned once before member access. |
| Method | _invalidate |
Invalidate cached member classifications. |
| Method | _make |
Create mutable classification containers for a scan pass. |
| Method | _scan |
Classify class members and commit cached reflection buckets. |
| Method | clear |
Clear all cached reflection data. |
| Method | constructor |
Retrieve constructor dependencies for the reflected class. |
| Method | get |
Retrieve type annotations for class attributes. |
| Method | get |
Retrieve the value of a class attribute. |
| Method | get |
Aggregate all class-level attributes. |
| Method | get |
Return the direct base classes of the reflected abstract class. |
| Method | get |
Return the class type associated with this reflection instance. |
| Method | get |
Return the name of the reflected abstract class. |
| Method | get |
Retrieve the docstring for the reflected abstract class. |
| Method | get |
Retrieve dunder (double underscore) class-level attributes. |
| Method | get |
Return all dunder (double underscore) method names in the abstract class. |
| Method | get |
Retrieve the absolute file path of the reflected abstract class. |
| Method | get |
Return a dictionary of magic (dunder) class attributes. |
| Method | get |
Return all magic (dunder) methods from the abstract class. |
| Method | get |
Return all method names defined in the abstract class. |
| Method | get |
Retrieve the signature of a method in the abstract class. |
| Method | get |
Return the module name of the reflected abstract class. |
| Method | get |
Return the fully qualified name of the abstract class. |
| Method | get |
Retrieve private asynchronous method names. |
| Method | get |
Retrieve all private class-level attributes. |
| Method | get |
Return all private asynchronous class method names. |
| Method | get |
Return a list of private class methods. |
| Method | get |
Return all private synchronous class method names. |
| Method | get |
Return all private instance method names. |
| Method | get |
Retrieve all private properties from the abstract class. |
| Method | get |
Return all private asynchronous static method names. |
| Method | get |
Return a list of private static method names. |
| Method | get |
Return all private synchronous static method names. |
| Method | get |
Return all private synchronous method names. |
| Method | get |
Retrieve all property names from the abstract class. |
| Method | get |
Retrieve the docstring of a property's getter method. |
| Method | get |
Retrieve the signature of a property's getter method. |
| Method | get |
Return all protected asynchronous method names. |
| Method | get |
Retrieve all protected class-level attributes. |
| Method | get |
Return all protected asynchronous class method names. |
| Method | get |
Return a list of protected class methods. |
| Method | get |
Return all protected synchronous class method names. |
| Method | get |
Return all protected instance method names. |
| Method | get |
Retrieve all protected properties from the abstract class. |
| Method | get |
Return all protected asynchronous static method names. |
| Method | get |
Return a list of protected static method names. |
| Method | get |
Return all protected synchronous static method names. |
| Method | get |
Return all protected synchronous method names. |
| Method | get |
Return all public asynchronous method names. |
| Method | get |
Retrieve all public class-level attributes. |
| Method | get |
Return all public asynchronous class method names. |
| Method | get |
Return all public class method names. |
| Method | get |
Return all public synchronous class method names. |
| Method | get |
Return all public instance method names. |
| Method | get |
Return all public property names from the abstract class. |
| Method | get |
Return all public asynchronous static method names. |
| Method | get |
Return all public static method names. |
| Method | get |
Return all public synchronous static method names. |
| Method | get |
Return all public synchronous method names from the abstract class. |
| Method | get |
Retrieve the source code of the reflected abstract class. |
| Method | has |
Check if the class has a specific attribute. |
| Method | has |
Determine if the abstract class contains a method with the given name. |
| Method | method |
Retrieve resolved and unresolved dependencies for a method. |
| Method | remove |
Remove an attribute from the reflected abstract class. |
| Method | remove |
Remove a method from the abstract class. |
| Method | set |
Set the value of a class attribute. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _abstract |
Undocumented |
| Instance Variable | _abstract |
Undocumented |
| Instance Variable | _abstract |
Undocumented |
| Instance Variable | _cache |
Undocumented |
| Instance Variable | _private |
Undocumented |
| Instance Variable | _scanned |
Undocumented |
str, value: object, flags: _Flags, b: dict[ str, object]):
(source)
¶
Classify a regular callable by visibility and coroutine type.
| Parameters | |
attr:str | Raw attribute name from the inspected class namespace. |
value:object | Callable object bound to attr. |
flags:_Flags | Precomputed visibility and dunder-state flags for attr. |
b:dict[str, object] | Mutable classification bucket updated in place. |
| Returns | |
None | Update method name buckets for visibility and sync/async groups. |
Classify a class method into reflection buckets.
| Parameters | |
attr:str | Method attribute name as declared on the class. |
value:classmethod | Bound classmethod descriptor to inspect. |
flags:_Flags | Precomputed visibility and dunder flags for attr. |
b:dict | Mutable reflection bucket updated in place. |
| Returns | |
None | Update b with normalized class method names. |
str, value: object, flags: _Flags, b: dict[ str, object]):
(source)
¶
Classify a non-callable attribute into visibility buckets.
| Parameters | |
attr:str | Attribute name to classify. |
value:object | Attribute value to store in the target bucket. |
flags:_Flags | Precomputed visibility flags for attr. |
b:dict[str, object] | Mutable classification bucket updated in place. |
| Returns | |
None | Update attribute name/value buckets by visibility. |
Classify a static method by visibility and coroutine status.
| Parameters | |
attr:str | Raw attribute name produced by class introspection. |
value:staticmethod | Static method descriptor to classify. |
flags:_Flags | Precomputed visibility and dunder flags for attr. |
b:dict | Mutable reflection bucket updated in place. |
| Returns | |
None | Update b with normalized static method names. |
Ensure class members are scanned once before member access.
Notes
Run a full single-pass class-dictionary scan only when no prior scan has been completed.
| Returns | |
None | Complete the documented operation without returning a value. |
Invalidate cached member classifications.
Notes
Remove all cache entries derived from scanned class members and mark the scanner state as stale so the next member access triggers a full re-scan.
| Returns | |
None | Complete the documented operation without returning a value. |
Classify class members and commit cached reflection buckets.
Performs a single pass over __dict__ to categorize properties, methods, and data attributes by visibility and execution type.
| Returns | |
None | Update internal cache buckets in place. |
Clear all cached reflection data.
Removes all cached entries stored in the reflection instance. Forces fresh computation on subsequent method calls.
| Returns | |
None | This method does not return a value. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.constructorSignatureRetrieve constructor dependencies for the reflected class.
| Returns | |
Signature | Structured representation of constructor dependencies, including resolved (names and values) and unresolved (parameter names without default values or annotations). |
Retrieve type annotations for class attributes.
| Returns | |
dict | Dictionary mapping attribute names to their annotated types. Private attribute names are normalized by removing name mangling prefixes. |
Retrieve the value of a class attribute.
| Parameters | |
attribute:str | Name of the attribute to retrieve. |
| Returns | |
object or None | Value of the specified class attribute, or None if not found. |
| Raises | |
ValueError | If the attribute does not exist or is inaccessible. |
Aggregate all class-level attributes.
Combines public, protected, private, and dunder attributes into a single dictionary. Excludes callable objects, static/class methods, and properties.
| Returns | |
dict | Dictionary mapping attribute names to their values. |
Return the class type associated with this reflection instance.
| Returns | |
Type | The abstract base class type provided during initialization. |
Return the name of the reflected abstract class.
| Returns | |
str | The name of the abstract class provided during initialization. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getDunderAttributesRetrieve dunder (double underscore) class-level attributes.
| Returns | |
dict | Dictionary mapping dunder attribute names to their values. Only includes attributes that start and end with double underscores, are not callable, static methods, class methods, or properties, and are not in the excluded built-in list. |
Retrieve the absolute file path of the reflected abstract class.
| Parameters | |
| Returns | |
str | The absolute file path containing the abstract class definition. |
| Raises | |
ValueError | If the file path cannot be retrieved because the class does not belong to an importable module file. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getMagicAttributesReturn a dictionary of magic (dunder) class attributes.
| Returns | |
dict | Dictionary mapping magic attribute names to their values. Only includes attributes that start with double underscores and are not callable, static methods, class methods, or properties. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getMethodSignatureRetrieve the signature of a method in the abstract class.
| Parameters | |
name:str | Name of the method to retrieve the signature for. |
| Returns | |
inspect.Signature | Signature object of the specified method. |
| Raises | |
ValueError | If the method does not exist or is not callable. |
Return the module name of the reflected abstract class.
| Returns | |
str | The fully qualified module name containing the abstract class. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getModuleWithClassNameReturn the fully qualified name of the abstract class.
| Returns | |
str | The module path and class name separated by a dot, such as 'module.submodule.ClassName'. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateAsyncMethodsRetrieve private asynchronous method names.
| Parameters | |
self:ReflectionAbstract | The reflection instance. |
| Returns | |
list of str | List of private asynchronous method names. Only includes private methods that are coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateAttributesRetrieve all private class-level attributes.
| Parameters | |
| Returns | |
dict | Dictionary mapping private attribute names (with name mangling removed) to their values. Only includes attributes starting with _ClassName that are not callable, static methods, class methods, or properties. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateClassMethodsReturn a list of private class methods.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of private class method names with class name prefixes removed. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateClassSyncMethodsReturn all private synchronous class method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of private synchronous class method names. Only includes private class methods that are not coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivatePropertiesRetrieve all private properties from the abstract class.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of private property names with class name prefixes removed. Only includes name-mangled properties that start with _ClassName. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateStaticAsyncMethodsReturn all private asynchronous static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of private static method names that are coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateStaticMethodsReturn a list of private static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of private static method names with class name prefixes removed. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPrivateStaticSyncMethodsReturn all private synchronous static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of private static method names that are synchronous (not coroutine functions). |
Retrieve all property names from the abstract class.
| Returns | |
List[str] | List of property names with name mangling prefixes removed for clarity. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPropertyDocstringRetrieve the docstring of a property's getter method.
| Parameters | |
name:str | The name of the property. |
| Returns | |
str or None | The docstring of the property's getter method, or None if unavailable. |
| Raises | |
ValueError | If the property does not exist or is not accessible. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPropertySignatureRetrieve the signature of a property's getter method.
| Parameters | |
name:str | Name of the property to inspect. |
| Returns | |
inspect.Signature | Signature object of the property's getter method. |
| Raises | |
ValueError | If the property does not exist or is not accessible. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getProtectedAttributesRetrieve all protected class-level attributes.
| Parameters | |
| Returns | |
dict | Dictionary mapping protected attribute names to their values. Only attributes that start with a single underscore, are not dunder, private, callable, static/class methods, or properties. |
Return all protected asynchronous class method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of protected asynchronous class method names. Only includes protected class methods that are coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getProtectedClassMethodsReturn a list of protected class methods.
| Parameters | |
self:ReflectionAbstract | The reflection instance. |
| Returns | |
list of str | Names of protected class methods (not instance methods). |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getProtectedClassSyncMethodsReturn all protected synchronous class method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of protected synchronous class method names. Only includes protected class methods that are not coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getProtectedPropertiesRetrieve all protected properties from the abstract class.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of protected property names. Only includes properties that start with a single underscore, are not dunder, and are not name-mangled private properties. |
Return all protected asynchronous static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of protected static method names that are coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getProtectedStaticMethodsReturn a list of protected static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of protected static method names. Only includes methods decorated with @staticmethod that start with a single underscore, are not dunder, and are not name-mangled private methods. |
Return all protected synchronous static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of protected static method names that are synchronous (not coroutine functions). |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPublicAttributesRetrieve all public class-level attributes.
| Parameters | |
| Returns | |
dict | Dictionary mapping public attribute names to their values. Only includes attributes that do not start with underscores and are not callable, static methods, class methods, or properties. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPublicPropertiesReturn all public property names from the abstract class.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of public property names with name mangling prefixes removed. Only properties that do not start with underscores are included. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPublicStaticAsyncMethodsReturn all public asynchronous static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of public static method names that are coroutine functions. |
orionis.introspection.abstract.contracts.reflection.IReflectionAbstract.getPublicStaticSyncMethodsReturn all public synchronous static method names.
| Parameters | |
self:ReflectionAbstract | |
| Returns | |
list of str | List of public static method names that are synchronous (not coroutine functions). |
Retrieve the source code of the reflected abstract class.
| Parameters | |
| Returns | |
str | The complete source code of the abstract class as a string. |
| Raises | |
ValueError | If the source code cannot be retrieved because the class has no reachable definition or no importable module file. |
Retrieve resolved and unresolved dependencies for a method.
| Parameters | |
methodstr | Name of the method to inspect. |
| Returns | |
Signature | Structured representation of method dependencies, including resolved and unresolved dependencies. |
| Raises | |
AttributeError | If the method does not exist on the abstract class. |
Remove an attribute from the reflected abstract class.
| Parameters | |
name:str | Name of the attribute to remove. |
| Returns | |
bool | True if the attribute was successfully removed. |
| Raises | |
ValueError | If the attribute does not exist or cannot be removed. |
Remove a method from the abstract class.
| Parameters | |
name:str | Name of the method to remove. |
| Returns | |
bool | True if the method was successfully removed. |
| Raises | |
ValueError | If the method does not exist or cannot be removed. |
Set the value of a class attribute.
| Parameters | |
name:str | Name of the attribute to set. Must be a valid Python identifier and not a reserved keyword. |
value:object | Value to assign to the attribute. Must not be callable. |
| Returns | |
bool | True if the attribute was successfully set. |
| Raises | |
ValueError | If the attribute name is invalid, is a Python keyword, or if the value is callable. |