# signals.signal #### callable\_accepts\_kwargs ```python callable_accepts_kwargs(func: Callable) -> bool ``` Checks if function accepts **kwargs. **Arguments**: - `func` (`function`): function which signature needs to be checked **Returns**: `bool`: result of the check #### make\_id ```python make_id(target: Any) -> Union[int, Tuple[int, int]] ``` Creates id of a function or method to be used as key to store signal **Arguments**: - `target` (`Any`): target which id we want **Returns**: `int`: id of the target ## Signal Objects ```python class Signal() ``` Signal that notifies all receiver functions. In ormar used by models to send pre_save, post_save etc. signals. #### connect ```python | connect(receiver: Callable) -> None ``` Connects given receiver function to the signal. **Raises**: - `SignalDefinitionError`: if receiver is not callable or not accept **kwargs **Arguments**: - `receiver` (`Callable`): receiver function #### disconnect ```python | disconnect(receiver: Callable) -> bool ``` Removes the receiver function from the signal. **Arguments**: - `receiver` (`Callable`): receiver function **Returns**: `bool`: flag if receiver was removed #### send ```python | async send(sender: Type["Model"], **kwargs: Any) -> None ``` Notifies all receiver functions with given kwargs **Arguments**: - `sender` (`Type["Model"]`): model that sends the signal - `kwargs` (`Any`): arguments passed to receivers ## SignalEmitter Objects ```python class SignalEmitter() ``` Emitter that registers the signals in internal dictionary. If signal with given name does not exist it's auto added on access.