Events

Events module.

Models

Event database models.

class asclepias_broker.events.models.Event(**kwargs)[source]

Event model.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

classmethod get(id=None, **kwargs)[source]

Get the event from the database.

class asclepias_broker.events.models.EventStatus[source]

Event status.

class asclepias_broker.events.models.ObjectEvent(**kwargs)[source]

Event related to an Identifier or Relationship.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

object

Get the associated Identifier or Relationship.

Return type:Union[Identifier, Relationship]
class asclepias_broker.events.models.PayloadType[source]

Payload type.

API

Events API.

class asclepias_broker.events.api.EventAPI[source]

Event API.

classmethod handle_event(event, no_index=False, user_id=None, eager=False)[source]

Handle an event payload.

Return type:Event

Views

Event views.

class asclepias_broker.events.views.EventResource[source]

Event resource.

post()[source]

Submit an event.

CLI

Events CLI.

asclepias-broker events

Event CLI commands.

asclepias-broker events [OPTIONS] COMMAND [ARGS]...

load

Load events from a directory.

asclepias-broker events load [OPTIONS] JSONDIR_OR_FILE

Options

--no-index
-e, --eager

Arguments

JSONDIR_OR_FILE

Required argument

Errors

Errors and exceptions.

exception asclepias_broker.events.errors.PayloadValidationRESTError(error_message, code=None, **kwargs)[source]

Invalid payload error.

Initialize the PayloadValidation REST exception.