Skip to main content

Value Object and Object Mother patterns implementation for Python

Project description

🛠️ Sindripy 🛠️

Easy use and customizable implementation for Value Object and Object Mother patterns.

Getting Started  •  Value Object Pattern  •  Object Mother Pattern  •  Contributing

[!NOTE] This project was generated using Instant Python, a fast, easy and reliable project generator for Python projects.

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

Sindripy provides a basic-high-customizable implementation to help you enforce domain invariants and improve code quality with minimal effort.


Why use sindripy? 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
  • 🧪 Generate realistic test data via the Object Mother pattern
  • 🧰 Start from ready made primitives and identifiers or extend with your own
  • 🔧 Plug in custom validators, decorators, and typed primitives

Documentation

This section provides a high-level overview of the sindripy library, its features, and how to get started. For detailed instructions and examples, please refer to the full Sindripy documentation.

Need help?

Installation

The latest version of sindripy can be installed from PyPI:

pip install sindripy

Requirements

Sindri tries to support the latest Python versions, we officially support from Python 3.10 to 3.13. Older versions of Python may work, but they are not guaranteed to be compatible.

Basic Usage

Here is a simple example of how to use sindri to create a value object and generate test data using an object mother.

from sindripy.value_objects import Integer, String

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

print(f"Name: {name.value}, Age: {age.value}")
from sindripy.mothers import IntegerPrimitivesMother, StringPrimitivesMother

random_age = IntegerPrimitivesMother.any()
random_name = StringPrimitivesMother.any()

[!NOTE] To learn more about advanced usage of value objects, including validation, custom value objects, complex objects like aggregates, visit the Value Objects and Object Mothers sections.

Contributing

We welcome contributions to sindripy! If you have ideas, suggestions, or improvements, please check out our contributing guide for details on how to get involved.

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

sindripy-0.1.5.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

sindripy-0.1.5-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file sindripy-0.1.5.tar.gz.

File metadata

  • Download URL: sindripy-0.1.5.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sindripy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 de7a88c165196eb0cde4dbfbbd69ea82c723c6af7bb859ba0adaa4867b299cb9
MD5 284d652aa77eda3d38d631e7f8fd4759
BLAKE2b-256 8b1bff5b8547782125843da1b3861a6e3a282d3c66bad80dca377d9d37350067

See more details on using hashes here.

Provenance

The following attestation bundles were made for sindripy-0.1.5.tar.gz:

Publisher: release.yml on dimanu-py/sindri

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

File details

Details for the file sindripy-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: sindripy-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sindripy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed11f559d84c45e0315aed7bd4918db8a4d0a902edcd6042845730887c689e3
MD5 6b23b4892ccc09cb1acd472d55e4405e
BLAKE2b-256 f1b9612ab8317680c8dcdfc661625260d55260827907ff369be0d5ab1e762112

See more details on using hashes here.

Provenance

The following attestation bundles were made for sindripy-0.1.5-py3-none-any.whl:

Publisher: release.yml on dimanu-py/sindri

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