class documentation

class Service:

Known subclasses: acme.runtime.PluginSupport.Service

View In Hierarchy

Base class for service classes.

Method __getattribute__ Override __getattribute__ to allow access to service endpoints by their endpoint name instead of the method name.
Method __init_subclass__ Initialize the service sub class, creating the service endpoint map by checking the methods marked by the @endpoint decorator.
Class Variable _pm_endpointMap Mapping of endpoint names to method names
def __getattribute__(self, name: str) -> Any:

Override __getattribute__ to allow access to service endpoints by their endpoint name instead of the method name.

Parameters
name:strThe name of the attribute to access. This can be either the real method name or the endpoint name defined by the @endpoint decorator.
Returns
AnyThe attribute value. If the name is an endpoint name, the corresponding method is returned.
def __init_subclass__(cls, **kwargs: Any):

Initialize the service sub class, creating the service endpoint map by checking the methods marked by the @endpoint decorator.

_pm_endpointMap: dict[str, str] =

Mapping of endpoint names to method names