SharedLibrary
method_type: SharedLibraryFunction
__init__(self, library, **functions):
LLM Docstring
Create a shared-library facade and optionally register functions from configuration dictionaries.
library:str | ctypes.CDLL | SharedLibraryLoaderlibrary path, handle, or loader
functions:dict[str, dict]registration options keyed by exposed attribute name
:returns:Noneno value is returned
register(self, tag, name=None, docstring=None, defaults=None, return_handler=None, prep_args=None, **params):
LLM Docstring
Register and return a callable wrapper for one library function.
The exposed tag may differ from the native function name; remaining keyword parameters define the FunctionSignature arguments.
tag:strlookup name stored in the facade
name:str | Nonenative symbol name, defaulting to
tagdocstring:str | Noneoptional function documentation
defaults:dict | Noneargument defaults
return_handler:Callable | Noneraw-result postprocessor
prep_args:Callable | Nonekeyword-argument preprocessing callback
params:dict[str, Any]argument names mapped to type specifications
:returns:SharedLibraryFunctionregistered function wrapper
get_function(self, item):
LLM Docstring
Retrieve a registered function wrapper by tag.
item:strregistered function tag
:returns:SharedLibraryFunctionregistered wrapper
__getattr__(self, item):
LLM Docstring
Resolve missing attributes as registered function tags.
item:strattribute name
:returns:SharedLibraryFunctionregistered wrapper
__repr__(self):
LLM Docstring
Return a representation of the library facade.
The current formatting expression passes a generator to str.format without a placeholder and therefore does not list the registered signatures.
:returns:strrepresentation string