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

Known subclasses: orionis.introspection.ReflectionAbstract

View In Hierarchy

Undocumented

Method clearCache Clear all cached reflection data.
Method constructorSignature Retrieve constructor dependencies for the reflected class.
Method getAnnotations Retrieve type annotations for class attributes.
Method getAttribute Retrieve the value of a class attribute.
Method getAttributes Aggregate all class-level attributes.
Method getBaseClasses Return the direct base classes of the reflected abstract class.
Method getClass Return the class type associated with this reflection instance.
Method getClassName Return the name of the reflected abstract class.
Method getDocstring Retrieve the docstring for the reflected abstract class.
Method getDunderAttributes Retrieve dunder (double underscore) class-level attributes.
Method getDunderMethods Return all dunder (double underscore) method names in the abstract class.
Method getFile Retrieve the absolute file path of the reflected abstract class.
Method getMagicAttributes Return a dictionary of magic (dunder) class attributes.
Method getMagicMethods Return all magic (dunder) methods from the abstract class.
Method getMethods Return all method names defined in the abstract class.
Method getMethodSignature Retrieve the signature of a method in the abstract class.
Method getModuleName Return the module name of the reflected abstract class.
Method getModuleWithClassName Return the fully qualified name of the abstract class.
Method getPrivateAsyncMethods Retrieve private asynchronous method names.
Method getPrivateAttributes Retrieve all private class-level attributes.
Method getPrivateClassAsyncMethods Return all private asynchronous class method names.
Method getPrivateClassMethods Return a list of private class methods.
Method getPrivateClassSyncMethods Return all private synchronous class method names.
Method getPrivateMethods Return all private instance method names.
Method getPrivateProperties Retrieve all private properties from the abstract class.
Method getPrivateStaticAsyncMethods Return all private asynchronous static method names.
Method getPrivateStaticMethods Return a list of private static method names.
Method getPrivateStaticSyncMethods Return all private synchronous static method names.
Method getPrivateSyncMethods Return all private synchronous method names.
Method getProperties Retrieve all property names from the abstract class.
Method getPropertyDocstring Retrieve the docstring of a property's getter method.
Method getPropertySignature Retrieve the signature of a property's getter method.
Method getProtectedAsyncMethods Return all protected asynchronous method names.
Method getProtectedAttributes Retrieve all protected class-level attributes.
Method getProtectedClassAsyncMethods Return all protected asynchronous class method names.
Method getProtectedClassMethods Return a list of protected class methods.
Method getProtectedClassSyncMethods Return all protected synchronous class method names.
Method getProtectedMethods Return all protected instance method names.
Method getProtectedProperties Retrieve all protected properties from the abstract class.
Method getProtectedStaticAsyncMethods Return all protected asynchronous static method names.
Method getProtectedStaticMethods Return a list of protected static method names.
Method getProtectedStaticSyncMethods Return all protected synchronous static method names.
Method getProtectedSyncMethods Return all protected synchronous method names.
Method getPublicAsyncMethods Return all public asynchronous method names.
Method getPublicAttributes Retrieve all public class-level attributes.
Method getPublicClassAsyncMethods Return all public asynchronous class method names.
Method getPublicClassMethods Return all public class method names.
Method getPublicClassSyncMethods Return all public synchronous class method names.
Method getPublicMethods Return all public instance method names.
Method getPublicProperties Return all public property names from the abstract class.
Method getPublicStaticAsyncMethods Return all public asynchronous static method names.
Method getPublicStaticMethods Return all public static method names.
Method getPublicStaticSyncMethods Return all public synchronous static method names.
Method getPublicSyncMethods Return all public synchronous method names from the abstract class.
Method getSourceCode Retrieve the source code of the reflected abstract class.
Method hasAttribute Check if the class has a specific attribute.
Method hasMethod Determine if the abstract class contains a method with the given name.
Method methodSignature Retrieve resolved and unresolved dependencies for a method.
Method removeAttribute Remove an attribute from the reflected abstract class.
Method removeMethod Remove a method from the abstract class.
Method setAttribute Set the value of a class attribute.
def clearCache(self): (source)

Clear all cached reflection data.

Removes all cached entries stored in the reflection instance. Forces fresh computation on subsequent method calls.

Returns
NoneThis method does not return a value.
def constructorSignature(self) -> Signature: (source)

Retrieve constructor dependencies for the reflected class.

Returns
SignatureStructured representation of constructor dependencies, including resolved (names and values) and unresolved (parameter names without default values or annotations).
def getAnnotations(self) -> dict: (source)

Retrieve type annotations for class attributes.

Returns
dictDictionary mapping attribute names to their annotated types. Private attribute names are normalized by removing name mangling prefixes.
def getAttribute(self, attribute: str) -> object | None: (source)

Retrieve the value of a class attribute.

Parameters
attribute:strName of the attribute to retrieve.
Returns
object or NoneValue of the specified class attribute, or None if not found.
Raises
ValueErrorIf the attribute does not exist or is inaccessible.
def getAttributes(self) -> dict: (source)

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
dictDictionary mapping attribute names to their values.
def getBaseClasses(self) -> list[type]: (source)

Return the direct base classes of the reflected abstract class.

Returns
list of typeList of direct base classes for the abstract class.
def getClass(self) -> type: (source)

Return the class type associated with this reflection instance.

Returns
TypeThe abstract base class type provided during initialization.
def getClassName(self) -> str: (source)

Return the name of the reflected abstract class.

Returns
strThe name of the abstract class provided during initialization.
def getDocstring(self) -> str | None: (source)

Retrieve the docstring for the reflected abstract class.

Returns
str or NoneThe docstring of the abstract class, or None if not available.
def getDunderAttributes(self) -> dict: (source)

Retrieve dunder (double underscore) class-level attributes.

Returns
dictDictionary 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.
def getDunderMethods(self) -> list[str]: (source)

Return all dunder (double underscore) method names in the abstract class.

Returns
list of strList of dunder method names. Only includes methods that start and end with double underscores, are callable, and are not static, class methods, or properties.
def getFile(self) -> str: (source)

Retrieve the absolute file path of the reflected abstract class.

Parameters
None
Returns
strThe absolute file path containing the abstract class definition.
Raises
ValueErrorIf the file path cannot be retrieved due to type errors or other unexpected exceptions.
def getMagicAttributes(self) -> dict: (source)

Return a dictionary of magic (dunder) class attributes.

Returns
dictDictionary 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.
def getMagicMethods(self) -> list[str]: (source)

Return all magic (dunder) methods from the abstract class.

Returns
list of strList of magic method names. This is an alias for getDunderMethods().
def getMethods(self) -> list[str]: (source)

Return all method names defined in the abstract class.

Returns
list of strList of all method names, including public, protected, private, static, and class methods.
def getMethodSignature(self, name: str) -> inspect.Signature: (source)

Retrieve the signature of a method in the abstract class.

Parameters
name:strName of the method to retrieve the signature for.
Returns
inspect.SignatureSignature object of the specified method.
Raises
ValueErrorIf the method does not exist or is not callable.
def getModuleName(self) -> str: (source)

Return the module name of the reflected abstract class.

Returns
strThe fully qualified module name containing the abstract class.
def getModuleWithClassName(self) -> str: (source)

Return the fully qualified name of the abstract class.

Returns
strThe module path and class name separated by a dot, such as 'module.submodule.ClassName'.
def getPrivateAsyncMethods(self) -> list[str]: (source)

Retrieve private asynchronous method names.

Parameters
self:ReflectionAbstractThe reflection instance.
Returns
list of strList of private asynchronous method names. Only includes private methods that are coroutine functions.
def getPrivateAttributes(self) -> dict: (source)

Retrieve all private class-level attributes.

Parameters
None
Returns
dictDictionary 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.
def getPrivateClassAsyncMethods(self) -> list[str]: (source)

Return all private asynchronous class method names.

Finds private class methods (name-mangled) that are coroutine functions.

Returns
list of strList of private asynchronous class method names with class name prefixes removed.
def getPrivateClassMethods(self) -> list[str]: (source)

Return a list of private class methods.

Parameters
self:ReflectionAbstract
Returns
list of strList of private class method names with class name prefixes removed.
def getPrivateClassSyncMethods(self) -> list[str]: (source)

Return all private synchronous class method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of private synchronous class method names. Only includes private class methods that are not coroutine functions.
def getPrivateMethods(self) -> list[str]: (source)

Return all private instance method names.

Private methods are those with name-mangling (start with _ClassName). Excludes static methods, class methods, properties, and dunder methods.

Returns
list of strList of private instance method names with class name prefixes removed.
def getPrivateProperties(self) -> list[str]: (source)

Retrieve all private properties from the abstract class.

Parameters
self:ReflectionAbstract
Returns
list of strList of private property names with class name prefixes removed. Only includes name-mangled properties that start with _ClassName.
def getPrivateStaticAsyncMethods(self) -> list[str]: (source)

Return all private asynchronous static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of private static method names that are coroutine functions.
def getPrivateStaticMethods(self) -> list[str]: (source)

Return a list of private static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of private static method names with class name prefixes removed.
def getPrivateStaticSyncMethods(self) -> list[str]: (source)

Return all private synchronous static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of private static method names that are synchronous (not coroutine functions).
def getPrivateSyncMethods(self) -> list[str]: (source)

Return all private synchronous method names.

Returns
list of strList of private synchronous method names. Only includes private methods that are not coroutine functions.
def getProperties(self) -> list[str]: (source)

Retrieve all property names from the abstract class.

Returns
List[str]List of property names with name mangling prefixes removed for clarity.
def getPropertyDocstring(self, name: str) -> str | None: (source)

Retrieve the docstring of a property's getter method.

Parameters
name:strThe name of the property.
Returns
str or NoneThe docstring of the property's getter method, or None if unavailable.
Raises
ValueErrorIf the property does not exist or is not accessible.
def getPropertySignature(self, name: str) -> inspect.Signature: (source)

Retrieve the signature of a property's getter method.

Parameters
name:strName of the property to inspect.
Returns
inspect.SignatureSignature object of the property's getter method.
Raises
ValueErrorIf the property does not exist or is not accessible.
def getProtectedAsyncMethods(self) -> list[str]: (source)

Return all protected asynchronous method names.

Parameters
None
Returns
list of strList of protected asynchronous method names. Only includes protected methods that are coroutine functions.
def getProtectedAttributes(self) -> dict: (source)

Retrieve all protected class-level attributes.

Parameters
None
Returns
dictDictionary 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.
def getProtectedClassAsyncMethods(self) -> list[str]: (source)

Return all protected asynchronous class method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of protected asynchronous class method names. Only includes protected class methods that are coroutine functions.
def getProtectedClassMethods(self) -> list[str]: (source)

Return a list of protected class methods.

Parameters
self:ReflectionAbstractThe reflection instance.
Returns
list of strNames of protected class methods (not instance methods).
def getProtectedClassSyncMethods(self) -> list[str]: (source)

Return all protected synchronous class method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of protected synchronous class method names. Only includes protected class methods that are not coroutine functions.
def getProtectedMethods(self) -> list[str]: (source)

Return all protected instance method names.

Parameters
None
Returns
list of strList of protected instance method names. Includes only methods that start with a single underscore, are not dunder, private, static, class methods, or properties.
def getProtectedProperties(self) -> list[str]: (source)

Retrieve all protected properties from the abstract class.

Parameters
self:ReflectionAbstract
Returns
list of strList of protected property names. Only includes properties that start with a single underscore, are not dunder, and are not name-mangled private properties.
def getProtectedStaticAsyncMethods(self) -> list[str]: (source)

Return all protected asynchronous static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of protected static method names that are coroutine functions.
def getProtectedStaticMethods(self) -> list[str]: (source)

Return a list of protected static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList 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.
def getProtectedStaticSyncMethods(self) -> list[str]: (source)

Return all protected synchronous static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of protected static method names that are synchronous (not coroutine functions).
def getProtectedSyncMethods(self) -> list[str]: (source)

Return all protected synchronous method names.

Returns
list of strList of protected synchronous method names. Only includes protected methods that are not coroutine functions.
def getPublicAsyncMethods(self) -> list[str]: (source)

Return all public asynchronous method names.

Returns
list of strList of public asynchronous method names. Only coroutine functions are included.
def getPublicAttributes(self) -> dict: (source)

Retrieve all public class-level attributes.

Parameters
None
Returns
dictDictionary 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.
def getPublicClassAsyncMethods(self) -> list[str]: (source)

Return all public asynchronous class method names.

Returns
list of strList of public asynchronous class method names. Only includes methods decorated with @classmethod that are coroutine functions and do not start with underscores.
def getPublicClassMethods(self) -> list[str]: (source)

Return all public class method names.

Returns
list of strList of public class method names. Only includes methods decorated with @classmethod that do not start with underscores.
def getPublicClassSyncMethods(self) -> list[str]: (source)

Return all public synchronous class method names.

Returns
list of strList of public synchronous class method names. Only includes methods that are not coroutine functions.
def getPublicMethods(self) -> list[str]: (source)

Return all public instance method names.

Returns
list of strList of public instance method names. Excludes dunder, protected, private methods, static methods, class methods, and properties.
def getPublicProperties(self) -> list[str]: (source)

Return all public property names from the abstract class.

Parameters
self:ReflectionAbstract
Returns
list of strList of public property names with name mangling prefixes removed. Only properties that do not start with underscores are included.
def getPublicStaticAsyncMethods(self) -> list[str]: (source)

Return all public asynchronous static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of public static method names that are coroutine functions.
def getPublicStaticMethods(self) -> list[str]: (source)

Return all public static method names.

Returns
list of strList of public static method names. Only includes methods decorated with @staticmethod that do not start with underscores.
def getPublicStaticSyncMethods(self) -> list[str]: (source)

Return all public synchronous static method names.

Parameters
self:ReflectionAbstract
Returns
list of strList of public static method names that are synchronous (not coroutine functions).
def getPublicSyncMethods(self) -> list[str]: (source)

Return all public synchronous method names from the abstract class.

Returns
list of strList of public synchronous method names. Excludes asynchronous methods.
def getSourceCode(self) -> str: (source)

Retrieve the source code of the reflected abstract class.

Parameters
None
Returns
strThe complete source code of the abstract class as a string.
Raises
ValueErrorIf the source code cannot be retrieved due to file system errors or other unexpected exceptions.
def hasAttribute(self, attribute: str) -> bool: (source)

Check if the class has a specific attribute.

Parameters
attribute:strThe name of the attribute to check.
Returns
boolTrue if the attribute exists, False otherwise.
def hasMethod(self, name: str) -> bool: (source)

Determine if the abstract class contains a method with the given name.

Parameters
name:strThe name of the method to check.
Returns
boolTrue if the method exists in the class, otherwise False.
def methodSignature(self, method_name: str) -> Signature: (source)

Retrieve resolved and unresolved dependencies for a method.

Parameters
method_name:strName of the method to inspect.
Returns
SignatureStructured representation of method dependencies, including resolved and unresolved dependencies.
Raises
AttributeErrorIf the method does not exist on the abstract class.
def removeAttribute(self, name: str) -> bool: (source)

Remove an attribute from the reflected abstract class.

Parameters
name:strName of the attribute to remove.
Returns
boolTrue if the attribute was successfully removed.
Raises
ValueErrorIf the attribute does not exist or cannot be removed.
def removeMethod(self, name: str) -> bool: (source)

Remove a method from the abstract class.

Parameters
name:strName of the method to remove.
Returns
boolTrue if the method was successfully removed.
Raises
ValueErrorIf the method does not exist or cannot be removed.
def setAttribute(self, name: str, value: object) -> bool: (source)

Set the value of a class attribute.

Parameters
name:strName of the attribute to set. Must be a valid Python identifier and not a reserved keyword.
value:objectValue to assign to the attribute. Must not be callable.
Returns
boolTrue if the attribute was successfully set.
Raises
ValueErrorIf the attribute name is invalid, is a Python keyword, or if the value is callable.