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 ReflectionCallable(IReflectionCallable): (source)
Constructor: ReflectionCallable(fn)
Inspect callable signatures, parameters and invocation metadata.
| Method | __contains__ |
Check if the cache contains the specified key. |
| Method | __delitem__ |
Remove an item from the memory cache by key. |
| Method | __getitem__ |
Retrieve a cached value by key. |
| Method | __init__ |
Initialize the reflection wrapper with a callable object. |
| Method | __setitem__ |
Store a value in the cache with the specified key. |
| Method | clear |
Clear all cached reflection data. |
| Method | get |
Return the callable function associated with this instance. |
| Method | get |
Analyze and return the dependency signature of the wrapped callable. |
| Method | get |
Return the docstring of the callable. |
| Method | get |
Retrieve the absolute path to the source file of the callable. |
| Method | get |
Return the module name where the callable is defined. |
| Method | get |
Return the fully qualified name of the callable. |
| Method | get |
Return the name of the callable. |
| Method | get |
Return the signature of the callable. |
| Method | get |
Retrieve the source code of the wrapped callable. |
| Class Variable | __slots__ |
Store the callable, cached results, and descriptive metadata snapshots. |
| Instance Variable | _cache |
Shared dict for deferred computation results and the external cache protocol. |
| Instance Variable | _docstring |
Documentation text extracted from the inspected callable. |
| Instance Variable | _function |
The function, method, or lambda to be wrapped. |
| Instance Variable | _module |
Module obtained from fn.__module__. |
| Instance Variable | _name |
Name identifying this declaration within its containing registry. |
Initialize the reflection wrapper with a callable object.
| Parameters | |
fn:collections.abc.Callable | The function, method, or lambda to be wrapped. |
| Returns | |
None | This method does not return a value. |
| Raises | |
TypeError | If fn is not a function, method, or lambda. |
Clear all cached reflection data.
Remove local results, refresh descriptive metadata, and invalidate shared dependency signatures and registered consumer plans. Subsequent calls observe changes to the callable's defaults, signature, and annotations.
| Returns | |
None | This method does not return a value. |
Return the callable function associated with this instance.
| Returns | |
collections.abc.Callable | The function object encapsulated by this instance. |
Analyze and return the dependency signature of the wrapped callable.
Delegates to ReflectDependencies to inspect each parameter and resolve its type annotation into a dependency descriptor. The result is stored in the shared cache so that repeated calls skip reanalysis.
| Returns | |
orionis.introspection.dependencies.entities.signature.Signature | A structure that holds the resolved and unresolved dependencies derived from the callable's parameter annotations. |
Return the docstring of the callable.
| Returns | |
str | The docstring of the function, or an empty string if not present. |
Return the module name where the callable is defined.
| Returns | |
str | The name of the module in which the function was declared. |
orionis.introspection.callables.contracts.reflection.IReflectionCallable.getModuleWithCallableNameReturn the fully qualified name of the callable.
Combines the module name and callable name to create a complete identifier.
| Returns | |
str | The module and callable name separated by a dot. |
Return the signature of the callable.
| Returns | |
inspect.Signature | The signature object representing the callable's parameters, default values, and type annotations. |
Retrieve the source code of the wrapped callable.
Uses Python's inspect module to extract the complete source code of the callable function from its definition file.
| Returns | |
str | The source code of the callable function as a string. |
| Raises | |
AttributeError | If the source code cannot be obtained due to an OSError or if the callable is built-in without accessible source. |