common Package

common Package

exception Module

Payload base exception handling.

exception payload.common.exception.AgentNotFound(message=None, **kwargs)

Bases: payload.common.exception.NotFound

message = 'Agent %(uuid)s could not be found'
exception payload.common.exception.NotFound(message=None, **kwargs)

Bases: payload.common.exception.PayloadException

code = 404
message = 'Resource could not be found'
exception payload.common.exception.PayloadException(message=None, **kwargs)

Bases: exceptions.Exception

Base Payload Exception

To correctly use this class, inherit from it and define a ‘message’ property. That message will get printf’d with the keyword arguments provided to the constructor.

code = 500
format_message()
headers = {}
message = 'An unknown exception occurred.'
safe = False
exception payload.common.exception.QueueCallerNotFound(message=None, **kwargs)

Bases: payload.common.exception.NotFound

message = 'Queue caller %(caller_id)s could not be found'
exception payload.common.exception.QueueMemberDuplicated(message=None, **kwargs)

Bases: payload.common.exception.PayloadException

message = 'Queue member %(uuid)s already exists.'
exception payload.common.exception.QueueMemberNotFound(message=None, **kwargs)

Bases: payload.common.exception.NotFound

message = 'Queue member %(uuid)s could not be found'
exception payload.common.exception.QueueNotFound(message=None, **kwargs)

Bases: payload.common.exception.NotFound

message = 'Queue %(uuid)s could not be found'

paths Module

payload.common.paths.basedir_def(*args)

Return an uninterpolated path relative to $pybasedir.

payload.common.paths.basedir_rel(*args)

Return a path relative to $pybasedir.

payload.common.paths.bindir_def(*args)

Return an uninterpolated path relative to $bindir.

payload.common.paths.bindir_rel(*args)

Return a path relative to $bindir.

payload.common.paths.state_path_def(*args)

Return an uninterpolated path relative to $state_path.

payload.common.paths.state_path_rel(*args)

Return a path relative to $state_path.

schema Module

class payload.common.schema.Schema(name, properties={})

Bases: object

raw()