adhocracy_core.websockets.schemas module

Colander schemas to validate and (de)serialize Websocket messages.

class Action(*arg, **kw)[source]

Bases: adhocracy_core.schema.SingleLine

An action requested by a client.

validator = <colander.OneOf object>
class SubscribableResource(*arg, **kw)[source]

Bases: adhocracy_core.schema.Resource

Temporary fix for #2244.

TODO: implement proper solution

missing = <object object>
validator = <colander.deferred object>[source]
class ClientRequestSchema(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Data structure for client requests.

class Status(*arg, **kw)[source]

Bases: adhocracy_core.schema.SingleLine

A status sent to the client.

validator = <colander.OneOf object>
default = 'ok'
class StatusConfirmation(*arg, **kw)[source]

Bases: adhocracy_core.websockets.schemas.ClientRequestSchema

Data structure for status confirmations sent to the client.

class Event(*arg, **kw)[source]

Bases: adhocracy_core.schema.SingleLine

The type of event notifications sent to the client.

validator = <colander.OneOf object>
default = 'modified'
class ServerNotification(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Notification sent to the server from the Pyramid WS client.

class Notification(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Notification sent to a client if a resource has changed.

class ChildNotification(*arg, **kw)[source]

Bases: adhocracy_core.websockets.schemas.Notification

ServerNotification involving a child resource.

class VersionNotification(*arg, **kw)[source]

Bases: adhocracy_core.websockets.schemas.Notification

ServerNotification involving a version.