class documentation
class Service:
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 |
Initialize the service sub class, creating the service endpoint map by checking the methods marked by the @endpoint decorator. |
| Class Variable | _pm_endpoint |
Mapping of endpoint names to method names |
| Class Variable | _service |
A dictionary to store any metadata of the service that can be used by the plugins. The metadata are not used by the service itself, but can be used to store any information that is relevant to the service... |
Override __getattribute__ to allow access to service endpoints by their endpoint name instead of the method name.
| Parameters | |
name:str | The name of the attribute to access. This can be either the real method name or the endpoint name defined by the @endpoint decorator. |
| Returns | |
Any | The attribute value. If the name is an endpoint name, the corresponding method is returned. |
Initialize the service sub class, creating the service endpoint map by checking the methods marked by the @endpoint decorator.
A dictionary to store any metadata of the service that can be used by the plugins. The metadata are not used by the service itself, but can be used to store any information that is relevant to the service. They are passed in the result of the service endpoint calls, so that callers can use them to determine how to handle the endpoint calls.