Skip to main content

Value Object pattern implementation for Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

value_object_sindri-0.2.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

value_object_sindri-0.2.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file value_object_sindri-0.2.0.tar.gz.

File metadata

  • Download URL: value_object_sindri-0.2.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for value_object_sindri-0.2.0.tar.gz
Algorithm Hash digest
SHA256 865752f39d930140b975fe8c2712665ef6dca93aadfb0644c0a6f81b3d6c784e
MD5 434fb26d70ffdd87441fb079e289f16b
BLAKE2b-256 2b9a0570163b0b8d540eea751a537a1229309c9b62651ff81603c3e76c11ea9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for value_object_sindri-0.2.0.tar.gz:

Publisher: release.yml on dimanu-py/value-object

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file value_object_sindri-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for value_object_sindri-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5264e595fa1fca662b2212bbaaa2afb397638942ececb19a084c267c5cf6de67
MD5 4727573f4a75f90245f49410f52cbbcb
BLAKE2b-256 749d24b43c101f7ee4269421f53a0ad40e4066ab3ce1f7605af3de5b306257e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for value_object_sindri-0.2.0-py3-none-any.whl:

Publisher: release.yml on dimanu-py/value-object

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page