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.1.0.tar.gz (17.5 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.1.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: value_object_sindri-0.1.0.tar.gz
  • Upload date:
  • Size: 17.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 85b66887a059c62a1cf8704facf5e0bdd81a6f7572738bf6b05cce337883fcbb
MD5 937e3d898dde6ff1c84bf4f378ec41b5
BLAKE2b-256 95a4ad274f370ca624fc4e4dfc931f0c8818be6d806c5db3a00e1b2da19cb0da

See more details on using hashes here.

Provenance

The following attestation bundles were made for value_object_sindri-0.1.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.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for value_object_sindri-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a40ee673bd2033fe2258fba5e8a68af05ea45f33be95e24e28e7805ed3a1cf7
MD5 0d2acc5ad6c6b05ecef247f568f4c642
BLAKE2b-256 cdafea3cceec9eb00bcb8650b7a1e5740c256c760b121a9f71290ee60bb30f80

See more details on using hashes here.

Provenance

The following attestation bundles were made for value_object_sindri-0.1.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