FunctionPool

class dsviper.FunctionPool

Bases: object

One pool of C++ functions: its uuid, name and documentation, and the functions it holds - query() by name, funcs for all of them, check() to raise instead of answering None.

Registration happens on the C++ side, before the pool reaches Python; nothing here adds a function.

A pool exists so that a C++ application embedding Python can offer its own functions to a script running inside it. The wheel alone never produces one, and the Node binding has no counterpart: it is loaded BY a host rather than embedded in one.

Note: Not directly instantiable.

check(func_name: str) → Function

Return the function named func_name, or raise if the pool has none.

documentation() → str

Return the documentation the pool was registered with, empty when none was given.

funcs → FunctionPoolFunctions

The functions of the pool, reached by attribute: pool.funcs.<name>. __dir__ lists the names.

name() → str

Return the pool name as declared.

query(func_name: str) → Function | None

Return the function named func_name, or None if the pool has none.

uuid() → ValueUUId

Return the uuid the pool is registered under.