proofit404 / stories

Service objects designed with OOP in mind.
https://proofit404.github.io/stories/
BSD 2-Clause "Simplified" License
297 stars 21 forks source link

Do not reinvent DTOs with State object. #722

Open proofit404 opened 1 year ago

proofit404 commented 1 year ago

Remove State, Argument, and Variable objects.

In all documentation examples use https://docs.python.org/3/library/types.html#types.SimpleNamespace instead.

Write documentation page how to use attrs and pydantic as DTOs with validation.

Field with init=False is a variable. Field with converter=DomainEntity, validator=TrafaretMapping is a contract.

Union features would be a separated library with attrs and pydantic libraries support.