mxcubecore.ipc.debug

Whitelist bypass for exploring and debugging - see IPC_FORMAT.md, “Debug bypass”.

Any resolvable role and any callable on it can be called. Arguments are validated against the method’s signature when a request model can be built from it, and passed through unchanged otherwise.

Only reachable when IPCServer’s allow_debug_calls is true (false by default). Never enable it outside a local, trusted session.

Functions

debug_call(beamline, role, method[, args, ...])

Call any method on any resolvable role.

describe_role(beamline[, role])

Class, sub-roles and public methods of role.

list_roles(beamline[, role])

The direct sub-roles of role (of beamline itself if empty).

mxcubecore.ipc.debug.debug_call(beamline: Any, role: str, method: str, args: List[Any] | None = None, kwargs: Dict[str, Any] | None = None) → Any[source]

Call any method on any resolvable role.

Raises:

pydantic.ValidationError – when the arguments don’t validate against the method’s signature.

Parameters:
Return type:

Any

mxcubecore.ipc.debug.describe_role(beamline: Any, role: str = '') → Dict[str, Any][source]

Class, sub-roles and public methods of role.

Each method has its signature and, when one can be built, the JSON schema of its arguments.

Parameters:
Return type:

Dict[str, Any]

mxcubecore.ipc.debug.list_roles(beamline: Any, role: str = '') → Dict[str, Any][source]

The direct sub-roles of role (of beamline itself if empty).

Parameters:
Return type:

Dict[str, Any]