django_socio_grpc.grpc_actions.placeholders
Module Contents
Classes
Placeholder is an abstract class used to define a placeholder for a grpc_action parameter |
|
Simple placeholder class to dynamically get an attribute of the service |
|
Simple placeholder class to retrieve anything from a function |
|
Functions
Data
Placeholder object to get matching service lookup field message |
|
Placeholder object to get matching service serializer |
API
- django_socio_grpc.grpc_actions.placeholders._T
‘TypeVar(…)’
- django_socio_grpc.grpc_actions.placeholders.ServiceCallable
None
- class django_socio_grpc.grpc_actions.placeholders.Placeholder
Placeholder is an abstract class used to define a placeholder for a grpc_action parameter
- abstract resolve(service: django_socio_grpc.generics.GenericService)
Resolve the placeholder :param service: the service instance :param action: the current action :return: the resolved value
- __call__(service: django_socio_grpc.generics.GenericService, action: django_socio_grpc.grpc_actions.actions.GRPCAction, field: str)
- class django_socio_grpc.grpc_actions.placeholders.AttrPlaceholder(attr_name: str)
Bases:
django_socio_grpc.grpc_actions.placeholders.PlaceholderSimple placeholder class to dynamically get an attribute of the service
Initialization
- resolve(service: django_socio_grpc.generics.GenericService)
- class django_socio_grpc.grpc_actions.placeholders.FnPlaceholder(fn: django_socio_grpc.grpc_actions.placeholders.ServiceCallable)
Bases:
django_socio_grpc.grpc_actions.placeholders.PlaceholderSimple placeholder class to retrieve anything from a function
Initialization
- resolve(service: django_socio_grpc.generics.GenericService)
- class django_socio_grpc.grpc_actions.placeholders.StrTemplatePlaceholder(string: str, *params: str | django_socio_grpc.grpc_actions.placeholders.ServiceCallable[str])
Bases:
django_socio_grpc.grpc_actions.placeholders.Placeholder- get_param_value(service, param: str | django_socio_grpc.grpc_actions.placeholders.ServiceCallable[str])
- resolve(service: django_socio_grpc.generics.GenericService)
- django_socio_grpc.grpc_actions.placeholders._get_lookup_fields(service)
- django_socio_grpc.grpc_actions.placeholders._get_serializer_class(service)
- django_socio_grpc.grpc_actions.placeholders.LookupField
‘FnPlaceholder(…)’
Placeholder object to get matching service lookup field message
- django_socio_grpc.grpc_actions.placeholders.SelfSerializer
‘FnPlaceholder(…)’
Placeholder object to get matching service serializer