vimsheet.formula.functions.registry

Function registry — maps uppercase names to callable implementations.

class vimsheet.formula.functions.registry.FunctionMeta(fn, names, category='other', _is_script_func=False, desc='')[source]

Bases: object

Metadata wrapper for a registered formula function.

Parameters:
__init__(fn, names, category='other', _is_script_func=False, desc='')[source]
Parameters:
fn
names
category
desc
__getattr__(name)[source]

Delegate attribute access to the wrapped function.

Parameters:

name (str)

Return type:

Any

vimsheet.formula.functions.registry.register(*names, category=None, desc='')[source]

Decorator: register a function under one or more uppercase names.

If category is None, it is auto-detected from the function’s module name. desc is a brief one-line description shown in the help screen.

Parameters:
  • names (str)

  • category (str | None)

  • desc (str)

Return type:

Callable[[Callable[[…], Any]], Callable[[…], Any]]

vimsheet.formula.functions.registry.get(name)[source]

Return the FunctionMeta registered under name (case-insensitive), or None.

Parameters:

name (str)

Return type:

FunctionMeta | None

vimsheet.formula.functions.registry.all_names()[source]

Return sorted list of all registered function names.

Return type:

list[str]

vimsheet.formula.functions.registry.all_functions()[source]

Return a copy of the registry mapping name → FunctionMeta.

Return type:

dict[str, FunctionMeta]

vimsheet.formula.functions.registry.register_script_function(name, script_path, desc='')[source]

Register an external Python script as a callable formula function.

Parameters:
Return type:

None