Skip to content

dimanu-py/value-object

Repository files navigation

Value Objects Sindri

Value Object pattern for Python and Domain Driven Design applications

Easy use and customizable implementation for the Value Object pattern.

Getting Started  •  Value Object Pattern

Sindri value object replaces ad hoc primitives and fragile validators with a consistent Value Object and Aggregate toolkit you can adopt quickly. Spin up validated value objects and aggregates with a simple and a small, focused API.

Why use it? Building your domain with Sindri lets you:

  • ⏱️ Cut domain modeling and validation to seconds
  • 🛡️ Declare immutable, validated value objects with clear error messages
  • 🧩 Model aggregates with explicit invariants and composition
  • 🧰 Start from ready made primitives and identifiers or extend with your own
  • 🔧 Plug in custom validators, decorators, and typed primitives
💧
Created with Instant Python
This project was generated using Instant Python, a fast, easy and reliable project generator for Python projects.

Fast Kickstart

pip install value-object-sindri      # zero dependencies

Create a value object and use it in your domain:

from value_object import Integer, String

age = Integer(30)
name = String("John Doe")

print(f"Name: {name.value}, Age: {age.value}")

Next Steps

ℹ️
Learn More
To learn more about advanced usage of value objects, including validation, custom value objects, complex objects like aggregates, visit the Value Object Pattern section of the documentation.