pyrakoon.client.utils¶
Utility functions for building client mixins
-
pyrakoon.client.utils.
validate_types
(specs, args)[source]¶ Validate method call argument types
Parameters: - specs (iterable of (str, pyrakoon.protocol.Type)) – Spec of expected types
- args (iterable of
object
) – Argument values
Raises: - TypeError – Type of an argument is invalid
- ValueError – Value of an argument is invalid
-
pyrakoon.client.utils.
call
(message_type)[source]¶ Expose a
Message
as a method on a clientNote: If the client method has an allow_dirty option (i.e. pyrakoon.protocol.ALLOW_DIRTY_ARG
is present in theARGS
field of message_type), this is automatically moved to the back.Parameters: message_type ( type
) – Type of the message this method should callReturns: Method which wraps a call to an Arakoon server using given message type Return type: callable