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:
|
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?
- Join a discussion 💬 on GitHub Discussions
- Raise an issue on GitHub
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sindripy-0.1.3.tar.gz.
File metadata
- Download URL: sindripy-0.1.3.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b16c5d76c97cdf588ef76cec9fd2e26b6f8101c2364f5c147e60e0ffd6e99f24
|
|
| MD5 |
8c8616bd7a07b9de27f69c35739e759d
|
|
| BLAKE2b-256 |
e53f57d95eea0d2eaef5f999de97a45401016a5ff55ec412983d3dc1d388c488
|
Provenance
The following attestation bundles were made for sindripy-0.1.3.tar.gz:
Publisher:
release.yml on dimanu-py/sindri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sindripy-0.1.3.tar.gz -
Subject digest:
b16c5d76c97cdf588ef76cec9fd2e26b6f8101c2364f5c147e60e0ffd6e99f24 - Sigstore transparency entry: 605255563
- Sigstore integration time:
-
Permalink:
dimanu-py/sindri@3a94d5121c493b7ecb17082fcdff5701643902a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dimanu-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a94d5121c493b7ecb17082fcdff5701643902a4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sindripy-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sindripy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cffa0666b5e323f20a956bae2c48ed40b667dcc4106981a940e1610d15df3f0
|
|
| MD5 |
31aedccdabece03ba1078a23c9433870
|
|
| BLAKE2b-256 |
3db1c46a6375d2f063c8a91f2843981decde5f2713b8d56b265607415e7570ab
|
Provenance
The following attestation bundles were made for sindripy-0.1.3-py3-none-any.whl:
Publisher:
release.yml on dimanu-py/sindri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sindripy-0.1.3-py3-none-any.whl -
Subject digest:
9cffa0666b5e323f20a956bae2c48ed40b667dcc4106981a940e1610d15df3f0 - Sigstore transparency entry: 605255565
- Sigstore integration time:
-
Permalink:
dimanu-py/sindri@3a94d5121c493b7ecb17082fcdff5701643902a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dimanu-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a94d5121c493b7ecb17082fcdff5701643902a4 -
Trigger Event:
workflow_dispatch
-
Statement type: