The utils.py module#

Summary#

remote_method

Decorator for passing remote methods.

MethodType

Enum for method or property types.

try_get_remote_method

Try to get a remote method.

try_get_remote_property

Try to get a remote property.

get_remote_methods

Yield names and methods of an object’s remote methods.

Description#

Utilities necessary for remote calls.

Module detail#

utils.try_get_remote_method(methodname: str, obj: Any) Tuple[str, Callable]#

Try to get a remote method.

utils.try_get_remote_property(attrname: str, obj: Any) Tuple[str, property]#

Try to get a remote property.

utils.get_remote_methods(obj) Generator[Tuple[str, Callable, MethodType], None, None]#

Yield names and methods of an object’s remote methods.

A remote method is identified by the presence of an attribute _is_remote set to True.

Parameters:
obj: Any

The object to inspect for remote methods.

Yields:
Generator[Tuple[str, Callable], None, None]

A tuple containing the method name and the method itself for each remote method found in the object