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 ReflectionConcrete(IReflectionConcrete): (source)
Constructor: ReflectionConcrete(concrete)
Undocumented
| Static Method | _route |
Route a non-callable member into the correct attribute bucket. |
| Static Method | _route |
Route a class method into the correct visibility and async bucket. |
| Static Method | _route |
Route a plain callable into the correct instance method buckets. |
| Static Method | _route |
Route a property descriptor into the correct visibility bucket. |
| Static Method | _route |
Route a static method into the correct visibility and async bucket. |
| Method | __contains__ |
Check if the cache contains the specified key. |
| Method | __delitem__ |
Remove an item from the cache by key. |
| Method | __getitem__ |
Retrieve a cached value by key. |
| Method | __init__ |
Initialize the reflection concrete with a validated class type. |
| Method | __setitem__ |
Store a value in the cache with the specified key. |
| Method | _scan |
Perform a single-pass classification of all members in the class __dict__. |
| Method | clear |
Clear the internal memory cache. |
| Method | constructor |
Analyze the constructor's dependencies. |
| Method | get |
Retrieve type annotations defined on the reflected class. |
| Method | get |
Retrieve the value of a class attribute. |
| Method | get |
Aggregate all class attributes of all visibility levels. |
| Method | get |
Return all base classes of the reflected class. |
| Method | get |
Return the class type being reflected. |
| Method | get |
Return the name of the reflected class. |
| Method | get |
Return the signature of the class constructor. |
| Method | get |
Return the docstring of the reflected class. |
| Method | get |
Retrieve all dunder (magic) class attributes. |
| Method | get |
Retrieve all dunder (magic) method names from the reflected class. |
| Method | get |
Return the absolute file path of the reflected class. |
| Method | get |
Return all magic (dunder) class attributes. |
| Method | get |
Return all magic (dunder) method names from the reflected class. |
| Method | get |
Retrieve all method names defined in the reflected class. |
| Method | get |
Retrieve the signature of a specific method. |
| Method | get |
Return the module name where the reflected class is defined. |
| Method | get |
Return the fully qualified class name with module path. |
| Method | get |
Return all private asynchronous method names of the class. |
| Method | get |
Retrieve all private class attributes. |
| Method | get |
Return all private asynchronous class method names. |
| Method | get |
Return a list of private class method names. |
| Method | get |
Return all private synchronous class method names. |
| Method | get |
Retrieve all private instance method names. |
| Method | get |
Return all private property names of the reflected class. |
| Method | get |
Retrieve all private asynchronous static method names of the class. |
| Method | get |
Return the names of all private static methods of the class. |
| Method | get |
Return all private synchronous static method names of the class. |
| Method | get |
Return all private synchronous method names of the class. |
| Method | get |
Return all property names defined in the reflected class. |
| Method | get |
Retrieve the value of a property from the reflected class. |
| Method | get |
Retrieve the docstring of a property's getter method. |
| Method | get |
Return the signature of a property's getter method. |
| Method | get |
Retrieve all protected asynchronous method names. |
| Method | get |
Retrieve all protected class attributes. |
| Method | get |
Return all protected asynchronous class method names. |
| Method | get |
Return a list of protected class method names. |
| Method | get |
Return all protected synchronous class method names. |
| Method | get |
Return all protected instance method names. |
| Method | get |
Retrieve all protected property names from the reflected class. |
| Method | get |
Retrieve 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 of the class. |
| Method | get |
Return all protected synchronous method names. |
| Method | get |
Return all public asynchronous method names of the reflected class. |
| Method | get |
Retrieve all public class attributes. |
| Method | get |
Return all public asynchronous class method names. |
| Method | get |
Return a list of public class method names. |
| Method | get |
Return all public synchronous class method names. |
| Method | get |
Return all public instance method names of the reflected class. |
| Method | get |
Return all public property names of the reflected class. |
| Method | get |
Return all public asynchronous static method names of the class. |
| Method | get |
Return a list of public static method names. |
| Method | get |
Return all public synchronous static method names of the class. |
| Method | get |
Return all public synchronous method names of the reflected class. |
| Method | get |
Retrieve the source code for the class or a specific method. |
| Method | has |
Determine if the reflected class has a specific attribute. |
| Method | has |
Determine if the class defines a method with the given name. |
| Method | method |
Analyze the dependencies of a specific method. |
| Method | remove |
Remove an attribute from the reflected class. |
| Method | remove |
Remove a method from the reflected class. |
| Method | set |
Set a class attribute to the specified value. |
| Method | set |
Add a method to the reflected class. |
| Instance Variable | _cache |
Undocumented |
| Instance Variable | _class |
Undocumented |
| Instance Variable | _concrete |
Undocumented |
| Instance Variable | _private |
Undocumented |
| Instance Variable | _private |
Undocumented |
str, value: object, prefix: str, prefix_len: int, buf: _ScanBuffers):
(source)
¶
Route a non-callable member into the correct attribute bucket.
Classifies the attribute as private, dunder, protected, or public and stores the value in the corresponding dictionary within _ScanBuffers. Standard dunder attributes listed in _DUNDER_ATTR_EXCLUDE are silently skipped.
| Parameters | |
attr:str | Raw attribute name from the class __dict__. |
value:object | The non-callable value to classify. |
prefix:str | Private name-mangling prefix (e.g. _ClassName). |
prefixint | Pre-computed length of prefix for efficient slicing. |
buf:_ScanBuffers | Mutable accumulator that collects all classification results. |
| Returns | |
None | Results are written into buf in place. |
str, value: classmethod, prefix: str, prefix_len: int, buf: _ScanBuffers):
(source)
¶
Route a class method into the correct visibility and async bucket.
Determines coroutine status from the wrapped __func__ and appends the attribute name to the appropriate _ScanBuffers lists for private, protected, or public class methods.
| Parameters | |
attr:str | Raw attribute name from the class __dict__. |
value:classmethod | The classmethod descriptor to classify. |
prefix:str | Private name-mangling prefix (e.g. _ClassName). |
prefixint | Pre-computed length of prefix for efficient slicing. |
buf:_ScanBuffers | Mutable accumulator that collects all classification results. |
| Returns | |
None | Results are written into buf in place. |
str, value: object, prefix: str, prefix_len: int, buf: _ScanBuffers):
(source)
¶
Route a plain callable into the correct instance method buckets.
Classifies the attribute as private, dunder, protected, or public and further separates sync from async variants within each group.
| Parameters | |
attr:str | Raw attribute name from the class __dict__. |
value:object | The callable object to classify. |
prefix:str | Private name-mangling prefix (e.g. _ClassName). |
prefixint | Pre-computed length of prefix for efficient slicing. |
buf:_ScanBuffers | Mutable accumulator that collects all classification results. |
| Returns | |
None | Results are written into buf in place. |
Route a property descriptor into the correct visibility bucket.
Appends the property name (with name mangling resolved) to the _ScanBuffers lists for private, protected, or public properties, and always to the global all_props list.
| Parameters | |
attr:str | Raw attribute name from the class __dict__. |
prefix:str | Private name-mangling prefix (e.g. _ClassName). |
prefixint | Pre-computed length of prefix for efficient slicing. |
buf:_ScanBuffers | Mutable accumulator that collects all classification results. |
| Returns | |
None | Results are written into buf in place. |
str, value: staticmethod, prefix: str, prefix_len: int, buf: _ScanBuffers):
(source)
¶
Route a static method into the correct visibility and async bucket.
Determines coroutine status from the wrapped __func__ and appends the attribute name to the appropriate _ScanBuffers lists for private, protected, or public static methods.
| Parameters | |
attr:str | Raw attribute name from the class __dict__. |
value:staticmethod | The staticmethod descriptor to classify. |
prefix:str | Private name-mangling prefix (e.g. _ClassName). |
prefixint | Pre-computed length of prefix for efficient slicing. |
buf:_ScanBuffers | Mutable accumulator that collects all classification results. |
| Returns | |
None | Results are written into buf in place. |
Initialize the reflection concrete with a validated class type.
| Parameters | |
concrete:Type | The class type to reflect. |
| Returns | |
None | This method does not return a value. |
| Raises | |
TypeError | If the argument is not a class type. |
ValueError | If the class is built-in, primitive, abstract, or an interface. |
Perform a single-pass classification of all members in the class __dict__.
Partitions every entry in the class dictionary into its respective category: public/protected/private/dunder for attributes, instance methods, class methods, static methods, and properties. Sync/async variants are determined in the same pass using the raw function objects, avoiding repeated getattr calls. All results are stored atomically in the instance cache via a single dict.update call.
| Returns | |
None | All classification results are stored atomically in the instance cache via a single dict.update call. |
Clear the internal memory cache.
Removes all cached entries stored in the reflection instance. Subsequent method calls will recompute and cache results.
| Returns | |
None | This method does not return a value. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.constructorSignatureAnalyze the constructor's dependencies.
Analyzes the constructor parameters to identify resolved and unresolved dependencies using type annotations and default values.
| Returns | |
Signature | Structured representation of resolved and unresolved dependencies. |
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 | |
dict | Dictionary of attribute names and their type annotations. |
Retrieve the value of a class attribute.
| Parameters | |
name:str | Name of the attribute to retrieve. |
default:Any, optional | Value to return if the attribute is not found. Defaults to None. |
| Returns | |
Any | Value of the attribute if found, otherwise the default value. |
Aggregate all class attributes of all visibility levels.
| Returns | |
dict | Dictionary 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. |
Return the name of the reflected class.
| Returns | |
str | The simple name of the class without module qualification. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getConstructorSignatureReturn the signature of the class constructor.
| Returns | |
inspect.Signature | Signature object for the __init__ method, containing parameter information. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getDunderAttributesRetrieve all dunder (magic) class attributes.
Dunder attributes are those with names that start and end with double underscores, excluding standard Python dunder attributes.
| Returns | |
dict | Dictionary mapping dunder attribute names to their values, excluding standard Python dunder attributes. |
Return the absolute file path of the reflected class.
| Returns | |
str | The absolute file path containing the class definition. |
| Raises | |
ValueError | If the file path cannot be determined. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getMagicAttributesReturn all magic (dunder) class attributes.
This method is an alias for getDunderAttributes() and provides access
to double underscore attributes.
| Returns | |
dict | Dictionary mapping magic attribute names to their values. |
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 str | List of all method names (instance, class, and static) defined in the class, including public, protected, and private methods. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getMethodSignatureRetrieve the signature of a specific method.
| Parameters | |
name:str | Name of the method to inspect. |
| Returns | |
inspect.Signature | Signature object containing parameter and return information. |
| Raises | |
ValueError | If the method does not exist or is not callable. |
Return the module name where the reflected class is defined.
| Returns | |
str | The fully qualified module name containing the class. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getModuleWithClassNameReturn the fully qualified class name with module path.
| Returns | |
str | The module name concatenated with the class name, separated by a dot. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getPrivateAttributesRetrieve all private class attributes.
Private attributes use Python's name mangling convention (double underscore prefix). Excludes methods, static methods, class methods, and properties.
| Returns | |
dict | Dictionary mapping private attribute names (with mangling removed) to their values. |
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:str | Name of the property to retrieve. |
| Returns | |
Any | The current value of the property. |
| Raises | |
ValueError | If the property does not exist or is not accessible. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getPropertyDocstringRetrieve the docstring of a property's getter method.
| Parameters | |
name:str | Name of the property to inspect. |
| Returns | |
str or None | The docstring of the property's getter function, or None if not defined. |
| Raises | |
ValueError | If the property does not exist or is not accessible. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getPropertySignatureReturn the signature of a property's getter method.
| Parameters | |
name:str | Name of the property to inspect. |
| Returns | |
inspect.Signature | The signature object of the property's getter function. |
| Raises | |
ValueError | If the property does not exist or is not accessible. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getProtectedAttributesRetrieve all protected class attributes.
Protected attributes are those that start with a single underscore, excluding dunder, public, and private attributes.
| Returns | |
dict | Dictionary mapping protected attribute names to their values. |
orionis.introspection.concretes.contracts.reflection.IReflectionConcrete.getPublicAttributesRetrieve 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 | |
dict | Dictionary mapping public attribute names to their values. Excludes dunder, protected, and private attributes. |
Analyze the dependencies of a specific method.
| Parameters | |
methodstr | Name of the method to analyze. |
| Returns | |
Signature | Structured representation of resolved and unresolved dependencies. |
| Raises | |
AttributeError | If the method does not exist in the class. |
Remove an attribute from the reflected 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 reflected class.
Handles private method name mangling before removal.
| 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 a class attribute to the specified value.
| Parameters | |
name:str | Name of the attribute to set. |
value:object | Value to assign to the attribute. |
| Returns | |
bool | True if the attribute was set successfully. |
| Raises | |
ValueError | If the attribute name is invalid or the value is callable. |
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:str | Name for the new method. |
method:Callable | Callable object to set as a method. |
| Returns | |
bool | True if the method was successfully added. |
| Raises | |
ValueError | If the method name already exists, is invalid, or the object is not callable. |