Skip to main content

Python seedwork library.

Project description

seedwork-python

Python seedwork library.

Code style: black

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

MIT @ Huang Kai

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 hashes)

Uploaded Source

Built Distribution

seedwork_python-0.4.0-py3-none-any.whl (13.6 kB view hashes)

Uploaded Python 3

Supported by

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