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

Known subclasses: orionis.introspection.ReflectionConcrete

View In Hierarchy

Undocumented

Method clearCache Clear the internal memory cache.
Method constructorSignature Analyze the constructor's dependencies.
Method getAnnotations Retrieve type annotations defined on the reflected class.
Method getAttribute Retrieve the value of a class attribute.
Method getAttributes Aggregate all class attributes of all visibility levels.
Method getBaseClasses Return all base classes of the reflected class.
Method getClass Return the class type being reflected.
Method getClassName Return the name of the reflected class.
Method getConstructorSignature Return the signature of the class constructor.
Method getDocstring Return the docstring of the reflected class.
Method getDunderAttributes Retrieve all dunder (magic) class attributes.
Method getDunderMethods Retrieve all dunder (magic) method names from the reflected class.
Method getFile Return the absolute file path of the reflected class.
Method getMagicAttributes Return all magic (dunder) class attributes.
Method getMagicMethods Return all magic (dunder) method names from the reflected class.
Method getMethods Retrieve all method names defined in the reflected class.
Method getMethodSignature Retrieve the signature of a specific method.
Method getModuleName Return the module name where the reflected class is defined.
Method getModuleWithClassName Return the fully qualified class name with module path.
Method getPrivateAsyncMethods Return all private asynchronous method names of the class.
Method getPrivateAttributes Retrieve all private class attributes.
Method getPrivateClassAsyncMethods Return all private asynchronous class method names.
Method getPrivateClassMethods Return a list of private class method names.
Method getPrivateClassSyncMethods Return all private synchronous class method names.
Method getPrivateMethods Retrieve all private instance method names.
Method getPrivateProperties Return all private property names of the reflected class.
Method getPrivateStaticAsyncMethods Retrieve all private asynchronous static method names of the class.
Method getPrivateStaticMethods Return the names of all private static methods of the class.
Method getPrivateStaticSyncMethods Return all private synchronous static method names of the class.
Method getPrivateSyncMethods Return all private synchronous method names of the class.
Method getProperties Return all property names defined in the reflected class.
Method getProperty Retrieve the value of a property from the reflected class.
Method getPropertyDocstring Retrieve the docstring of a property's getter method.
Method getPropertySignature Return the signature of a property's getter method.
Method getProtectedAsyncMethods Retrieve all protected asynchronous method names.
Method getProtectedAttributes Retrieve all protected class attributes.
Method getProtectedClassAsyncMethods Return all protected asynchronous class method names.
Method getProtectedClassMethods Return a list of protected class method names.
Method getProtectedClassSyncMethods Return all protected synchronous class method names.
Method getProtectedMethods Return all protected instance method names.
Method getProtectedProperties Retrieve all protected property names from the reflected class.
Method getProtectedStaticAsyncMethods Retrieve 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 of the class.
Method getProtectedSyncMethods Return all protected synchronous method names.
Method getPublicAsyncMethods Return all public asynchronous method names of the reflected class.
Method getPublicAttributes Retrieve all public class attributes.
Method getPublicClassAsyncMethods Return all public asynchronous class method names.
Method getPublicClassMethods Return a list of public class method names.
Method getPublicClassSyncMethods Return all public synchronous class method names.
Method getPublicMethods Return all public instance method names of the reflected class.
Method getPublicProperties Return all public property names of the reflected class.
Method getPublicStaticAsyncMethods Return all public asynchronous static method names of the class.
Method getPublicStaticMethods Return a list of public static method names.
Method getPublicStaticSyncMethods Return all public synchronous static method names of the class.
Method getPublicSyncMethods Return all public synchronous method names of the reflected class.
Method getSourceCode Retrieve the source code for the class or a specific method.
Method hasAttribute Determine if the reflected class has a specific attribute.
Method hasMethod Determine if the class defines a method with the given name.
Method methodSignature Analyze the dependencies of a specific method.
Method removeAttribute Remove an attribute from the reflected class.
Method removeMethod Remove a method from the reflected class.
Method setAttribute Set a class attribute to the specified value.
Method setMethod Add a method to the reflected class.
def clearCache(self): (source)

Clear the internal memory cache.

Removes all cached entries stored in the reflection instance. Subsequent method calls will recompute and cache results.

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

Analyze the constructor's dependencies.

Analyzes the constructor parameters to identify resolved and unresolved dependencies using type annotations and default values.

Returns
SignatureStructured representation of resolved and unresolved dependencies.
def getAnnotations(self) -> dict: (source)

Retrieve type annotations defined on the reflected class.

Resolves name mangling for private attributes and returns a dictionary mapping attribute names to their type annotations.

Returns
dictDictionary of attribute names and their type annotations.
def getAttribute(self, name: str, default: Any = None) -> Any: (source)

Retrieve the value of a class attribute.

Parameters
name:strName of the attribute to retrieve.
default:Any, optionalValue to return if the attribute is not found. Defaults to None.
Returns
AnyValue of the attribute if found, otherwise the default value.
def getAttributes(self) -> dict: (source)

Aggregate all class attributes of all visibility levels.

Returns
dictDictionary mapping attribute names (str) to their values. Includes public, protected, private (with name mangling removed), and dunder attributes. Excludes methods and properties. The result is cached.
def getBaseClasses(self) -> list[type]: (source)

Return all base classes of the reflected class.

Returns
list of typeA list containing all base classes in the method resolution order.
def getClass(self) -> type: (source)

Return the class type being reflected.

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

Return the name of the reflected class.

Returns
strThe simple name of the class without module qualification.
def getConstructorSignature(self) -> inspect.Signature: (source)

Return the signature of the class constructor.

Returns
inspect.SignatureSignature object for the __init__ method, containing parameter information.
def getDocstring(self) -> str | None: (source)

Return the docstring of the reflected class.

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

Retrieve all dunder (magic) class attributes.

Dunder attributes are those with names that start and end with double underscores, excluding standard Python dunder attributes.

Returns
dictDictionary mapping dunder attribute names to their values, excluding standard Python dunder attributes.
def getDunderMethods(self) -> list[str]: (source)

Retrieve all dunder (magic) method names from the reflected class.

Finds callable attributes that follow the double underscore naming convention, excluding static, class methods, and properties.

Returns
list of strList of dunder method names available in the class.
def getFile(self) -> str: (source)

Return the absolute file path of the reflected class.

Returns
strThe absolute file path containing the class definition.
Raises
ValueErrorIf the file path cannot be determined.
def getMagicAttributes(self) -> dict: (source)

Return all magic (dunder) class attributes.

This method is an alias for getDunderAttributes() and provides access to double underscore attributes.

Returns
dictDictionary mapping magic attribute names to their values.
def getMagicMethods(self) -> list[str]: (source)

Return all magic (dunder) method names from the reflected class.

This is an alias for getDunderMethods(), providing alternative naming for accessing double underscore methods.

Returns
list of strList of magic method names available in the class.
def getMethods(self) -> list[str]: (source)

Retrieve all method names defined in the reflected class.

Aggregates method names from all visibility levels (public, protected, private) and method types (instance, class, static). The result is cached after the first call for efficiency.

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

Retrieve the signature of a specific method.

Parameters
name:strName of the method to inspect.
Returns
inspect.SignatureSignature object containing parameter and return information.
Raises
ValueErrorIf the method does not exist or is not callable.
def getModuleName(self) -> str: (source)

Return the module name where the reflected class is defined.

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

Return the fully qualified class name with module path.

Returns
strThe module name concatenated with the class name, separated by a dot.
def getPrivateAsyncMethods(self) -> list[str]: (source)

Return all private asynchronous method names of the class.

Finds private methods (using name mangling) that are coroutine functions.

Returns
list of strList of private asynchronous method names.
def getPrivateAttributes(self) -> dict: (source)

Retrieve all private class attributes.

Private attributes use Python's name mangling convention (double underscore prefix). Excludes methods, static methods, class methods, and properties.

Returns
dictDictionary mapping private attribute names (with mangling removed) to their values.
def getPrivateClassAsyncMethods(self) -> list[str]: (source)

Return all private asynchronous class method names.

Finds private class methods (using name mangling) that are coroutine functions.

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

Return a list of private class method names.

Private class methods use Python's name mangling convention and are defined with a double underscore prefix.

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

Return all private synchronous class method names.

Returns
list of strList of private synchronous class method names.
def getPrivateMethods(self) -> list[str]: (source)

Retrieve all private instance method names.

Private methods are those using Python's name mangling convention (class name prefix). Name mangling is resolved in the returned names.

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

Return all private property names of the reflected class.

Private properties use Python's name mangling convention (class name prefix). The returned names have name mangling removed.

Returns
list of strList of private property names with name mangling removed.
def getPrivateStaticAsyncMethods(self) -> list[str]: (source)

Retrieve all private asynchronous static method names of the class.

Returns
list of strList of private asynchronous static method names.
def getPrivateStaticMethods(self) -> list[str]: (source)

Return the names of all private static methods of the class.

Private static methods are those using Python's name mangling convention (class name prefix).

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

Return all private synchronous static method names of the class.

Returns
list of strList of private synchronous static method names.
def getPrivateSyncMethods(self) -> list[str]: (source)

Return all private synchronous method names of the class.

Returns
list of strList of private synchronous method names.
def getProperties(self) -> list[str]: (source)

Return all property names defined in the reflected class.

Scans the class dictionary for property objects and returns their names with private attribute name mangling resolved.

Returns
list of strList of all property names in the class, with name mangling removed.
def getProperty(self, name: str) -> Any: (source)

Retrieve the value of a property from the reflected class.

Handles private property name mangling and validates that the requested attribute is a property object.

Parameters
name:strName of the property to retrieve.
Returns
AnyThe current value of the property.
Raises
ValueErrorIf the property does not exist or is not accessible.
def getPropertyDocstring(self, name: str) -> str | None: (source)

Retrieve the docstring of a property's getter method.

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

Return the signature of a property's getter method.

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

Retrieve all protected asynchronous method names.

Filters protected methods to include only those that are coroutine functions.

Returns
list of strList of protected asynchronous method names.
def getProtectedAttributes(self) -> dict: (source)

Retrieve all protected class attributes.

Protected attributes are those that start with a single underscore, excluding dunder, public, and private attributes.

Returns
dictDictionary mapping protected attribute names to their values.
def getProtectedClassAsyncMethods(self) -> list[str]: (source)

Return all protected asynchronous class method names.

Returns
list of strList of protected asynchronous class method names.
def getProtectedClassMethods(self) -> list[str]: (source)

Return a list of protected class method names.

Protected class methods start with a single underscore, are not dunder, and are not private (name-mangled).

Returns
list of strList of protected class method names.
def getProtectedClassSyncMethods(self) -> list[str]: (source)

Return all protected synchronous class method names.

Returns
list of strList of protected synchronous class method names.
def getProtectedMethods(self) -> list[str]: (source)

Return all protected instance method names.

Protected methods start with a single underscore, are not dunder, and are not private (name-mangled). Excludes static, class methods, and properties.

Returns
list of strList of protected instance method names.
def getProtectedProperties(self) -> list[str]: (source)

Retrieve all protected property names from the reflected class.

Protected properties are those that start with a single underscore, are not private (name-mangled), and are not dunder attributes.

Returns
list of strList of protected property names.
def getProtectedStaticAsyncMethods(self) -> list[str]: (source)

Retrieve all protected asynchronous static method names.

Returns
list of strList of protected asynchronous static method names.
def getProtectedStaticMethods(self) -> list[str]: (source)

Return a list of protected static method names.

Protected static methods start with a single underscore, are not dunder, and are not private (name-mangled).

Returns
list of strList of protected static method names.
def getProtectedStaticSyncMethods(self) -> list[str]: (source)

Return all protected synchronous static method names of the class.

Returns
list of strList of protected synchronous static method names.
def getProtectedSyncMethods(self) -> list[str]: (source)

Return all protected synchronous method names.

Filters protected methods to include only those that are not coroutine functions.

Returns
list of strList of protected synchronous method names.
def getPublicAsyncMethods(self) -> list[str]: (source)

Return all public asynchronous method names of the reflected class.

Filters public methods to include only coroutine functions.

Returns
list of strList of public asynchronous method names.
def getPublicAttributes(self) -> dict: (source)

Retrieve all public class attributes.

Public attributes are those that do not start with an underscore and are not callables, static methods, class methods, or properties.

Returns
dictDictionary mapping public attribute names to their values. Excludes dunder, protected, and private attributes.
def getPublicClassAsyncMethods(self) -> list[str]: (source)

Return all public asynchronous class method names.

Returns
list of strList of public asynchronous class method names.
def getPublicClassMethods(self) -> list[str]: (source)

Return a list of public class method names.

Public class methods are those that do not start with an underscore, are not dunder, and are not private (name-mangled).

Returns
list of strList of public class method names.
def getPublicClassSyncMethods(self) -> list[str]: (source)

Return all public synchronous class method names.

Returns
list of strList of public synchronous class method names.
def getPublicMethods(self) -> list[str]: (source)

Return all public instance method names of the reflected class.

Retrieves method names that are callable, not static or class methods, not properties, and do not start with underscores.

Returns
list of strList of public instance method names.
def getPublicProperties(self) -> list[str]: (source)

Return all public property names of the reflected class.

Properties are considered public if their names do not start with underscores or the class name (for name-mangled attributes).

Returns
list of strList of public property names with name mangling resolved.
def getPublicStaticAsyncMethods(self) -> list[str]: (source)

Return all public asynchronous static method names of the class.

Returns
list of strList of public asynchronous static method names.
def getPublicStaticMethods(self) -> list[str]: (source)

Return a list of public static method names.

Scans the class dictionary for static methods that are public, i.e., do not start with underscores or use name mangling.

Returns
list of strList of public static method names.
def getPublicStaticSyncMethods(self) -> list[str]: (source)

Return all public synchronous static method names of the class.

Returns
list of strList of public synchronous static method names.
def getPublicSyncMethods(self) -> list[str]: (source)

Return all public synchronous method names of the reflected class.

Filters public methods to include only those that are not coroutine functions.

Returns
list of strList of public synchronous method names.
def getSourceCode(self, method: str | None = None) -> str | None: (source)

Retrieve the source code for the class or a specific method.

Parameters
method:str or None, optionalName of the method to retrieve source code for. If None, returns the source code of the entire class.
Returns
str or NoneSource code as a string if available, otherwise None.
def hasAttribute(self, attribute: str) -> bool: (source)

Determine if the reflected class has a specific attribute.

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

Determine if the class defines a method with the given name.

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

Analyze the dependencies of a specific method.

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

Remove an attribute from the reflected 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 reflected class.

Handles private method name mangling before removal.

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 a class attribute to the specified value.

Parameters
name:strName of the attribute to set.
value:objectValue to assign to the attribute.
Returns
boolTrue if the attribute was set successfully.
Raises
ValueErrorIf the attribute name is invalid or the value is callable.
def setMethod(self, name: str, method: Callable) -> bool: (source)

Add a method to the reflected class.

Validates the method name and callable before adding it to the class. Handles private method name mangling automatically.

Parameters
name:strName for the new method.
method:CallableCallable object to set as a method.
Returns
boolTrue if the method was successfully added.
Raises
ValueErrorIf the method name already exists, is invalid, or the object is not callable.