Interface between script and Finesse.

Adapters provide a programmatic way to retrieve useful information about KatScript directives using their corresponding Python objects, and vice versa. This is primarily used for the compiler and generator, but is also used to improve syntax suggestions and error messages.

The adapter class hierarchy is intentionally very generic. By default, an ordinary KatScript directive corresponding to an ordinary Finesse object is quite simple to specify and should “just work”. When special behaviour is required, e.g. in cases where the KatScript directive has different arguments than the corresponding Python object (e.g. tem) or where there is no corresponding Python object (e.g. modes), the methods and members of the adapter can be overridden.


AnalysisDocumenter(*, item_type, **kwargs)

AnalysisDumper(*, item_type, **kwargs)

AnalysisFactory(*, item_type)

AnalysisSetter(*, item_type, **kwargs)

CommandMethodDocumenter(*[, sig_ignore])

CommandMethodSetter(*[, sig_ignore])

CommandPropertyDocumenter(*, item_type, **kwargs)

CommandPropertyDumper(*, item_type[, default])

CommandPropertySetter(*, item_type, **kwargs)

ElementDocumenter(*, item_type, **kwargs)

ElementDumper(*, item_type, **kwargs)


ElementSetter(*, item_type, **kwargs)

ElementSyntaxMixin(*[, sig_type, sig_ignore])

FunctionalSyntaxMixin(*[, sig_type, sig_ignore])

ItemAdapter(full_name[, short_name, ...])

Adapter defining how a script instruction maps to/from a Python type.

ItemDocumenter(*, item_type)

ItemDumper(*, item_type)

ItemFactory(*, item_type)

ItemHandler(*, item_type)

Root class for all dumper, setter, factory and documenter objects.

ItemSetter(*, item_type)

NumpyStyleDocstringGetterMixin(*[, doc_type])

SignatureArgumentMixin(*[, sig_type, sig_ignore])

Mixin providing ability to retrieve signature arguments from a Python function.

SignatureAttributeParameterMixin([ref_args, ...])

Mixin providing the ability to get and set item parameters by inspecting its constructor signature arguments matching equivalently named object attributes.

SyntaxMixin(*[, sig_type, sig_ignore])


AnalysisDump(analysis, adapter, parameters, ...)

A set of analysis parameters and metadata.

Argument(name, kind, default, annotation)

A generic instruction argument.

ArgumentDump(name, kind, default, ...)

A Finesse object argument name, its current value, default value, kind, annotation, and whether it should be dumped by value or reference.

BoundArgument(name, kind, default, ...)

A concrete argument originating from a call to a setter.

CommandDump(adapter, parameters, is_default)

A set of command parameters and metadata.

ElementDump(element, adapter, parameters, ...)

A set of element parameters and metadata.


ArgumentType(value[, names, module, ...])

Signature argument types.