eventbus.example package

Submodules

eventbus.example.entity module

class eventbus.example.entity.Example(first_name: str, last_name: str, age: int, internals: Optional[List[eventbus.example.entity.ExampleInternal]] = None, **kwargs)[source]

Bases: eventbus.domain.aggregate.BaseAggregateRoot

class Event(originator_version: int, **kwargs)[source]

Bases: eventbus.domain.aggregate.Event

class ExampleInternalAdded(originator_version: int, **kwargs)[source]

Bases: eventbus.example.entity.Event

mutate(obj)[source]

Updates (“mutates”) given ‘obj’.

Intended to be overridden by subclasses, as the most concise way of coding a default projection of the event (for example into the state of a domain entity).

The advantage of implementing a default projection using this method rather than __mutate__ is that you don’t need to call super or return a value.

Parameters:obj – domain entity to be mutated
add(value: int)[source]
summ
class eventbus.example.entity.ExampleInternal(value: int, **kwargs)[source]

Bases: eventbus.domain.entity.TimestampedVersionedEntity

class Event(originator_version: int, **kwargs)[source]

Bases: eventbus.domain.entity.Event

Module contents