nvflare.collab.api.publish_interface module

class MethodInterface(parameters)[source]

Bases: Sequence[str]

Immutable method signature used to bind user calls before transport.

bind(args, kwargs) dict[source]
prepare_invocation(kwargs)[source]

Restore positional-only values after transport normalization.

to_wire()[source]
validate_normalized(args, kwargs)[source]
class MethodParameter(name: str, kind: str, required: bool, legacy=False)[source]

Bases: object

Serializable subset of an inspect.Parameter used for remote binding.

classmethod from_wire(value)[source]
to_dict()[source]
class PublishInterface(methods: Mapping[str, Sequence] | None = None)[source]

Bases: Mapping[str, MethodInterface]

Immutable description of an object’s published Collab methods.

classmethod from_dict(methods: Mapping[str, Sequence] | None) PublishInterface[source]
get_method(method_name: str) MethodInterface | None[source]

Return a method interface, preserving an empty interface for zero-argument methods.

to_dict() dict[source]

Return the plain-dict representation used for synchronization.