Conceptual
Login

CQRS in Python: Clean Reads and Writes using FastAPI and MongoDB

Command Query Responsibility Segregation (CQRS) is an architectural pattern that separates operations that change state (commands) from operations that read state (queries), allowing each side to use its own model, schema, and storage optimized for its purpose. The read side is populated from the write side through a projection step, which makes the read model eventually consistent with the write model. It belongs to software architecture and data-system design, extending command-query separation to the system level, and is commonly paired with event sourcing but does not require it.