Python seedwork library.
Project description
seedwork-python
Python seedwork library.
Table of Contents
Requirements
python 3.9+
Installation
Using poetry
Make sure you have installed poetry
poetry add seedwork-python
Using pip
pip install seedwork-python
Usage
from dataclasses import dataclass
from seedwork.domain.aggregate_root import AggregateRoot
@dataclass
class User(AggregateRoot):
name: str
age: int
def is_adult(self) -> bool:
return self.age >= 18
user = User(name='foo', age=18)
assert user.is_adult()
For more examples, please refer to tests.
Or you can refer to the sample project eshop
License
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
seedwork_python-0.4.0.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file seedwork_python-0.4.0.tar.gz
.
File metadata
- Download URL: seedwork_python-0.4.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.13 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0f661135a22cea565fabaa3522d404ac64449784122d899c146bcf8d2ae55a |
|
MD5 | 20a6606b769daf26bf5caa6d9a8dbb25 |
|
BLAKE2b-256 | b3a3e3f189d3991eb1a5169e2c98c4a54b66a146179eaa603726358659db9acd |
File details
Details for the file seedwork_python-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: seedwork_python-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.13 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb6d19b20650eb6efd5fa471744fe361d0025be8d1fce84bb417b47125c68800 |
|
MD5 | 3aef4fca6a13c39ef9073315b4928fb3 |
|
BLAKE2b-256 | b159f5d8684928de44373985c7918e45f7d2b9c5a7175415918fb12fa2bf6c85 |