Skip to content

castlecraft_engineer.abstractions.command

castlecraft_engineer.abstractions.command

Command dataclass

Bases: ABC

Abstract base class for all commands in the CQRS pattern. Commands represent an intention to change the system state. They should be immutable data structures.

Source code in src/castlecraft_engineer/abstractions/command.py
@dataclass(frozen=True)
class Command(abc.ABC):
    """
    Abstract base class for all commands in the CQRS pattern.
    Commands represent an intention to change the system state.
    They should be immutable data structures.
    """