Skip to main content

Domain-Driven Design (DDD) toolkit to quickly develop complex apps

Project description

Cosmic Toolkit

Tests workflow status

Cosmic Toolkit is an opinionated toolkit to speed up the development of complex apps.

There aren't many examples of how to implement Domain-Driven Design in Python so this package aims to make DDD adoption in Python applications simple and straightfoward.

This toolkit is inspired by Cosmic Python. Cosmic Python and Domain-Driven Design help to decouple business logic from application concerns.

It's highly recommended that you read the Cosmic Python book and view the sample repository. In particular, the branch with the code for Chapter 13 is relevant for how to implement these patterns.

Currently in Alpha, so proceed with caution! I'm learning DDD as I use this package in my own projects. While this package is in Alpha, expect many breaking changes.

Installation

pip install cosmic-toolkit

Example usage

There's a fairly complete example of how to use this package in ./test/test_message_bus.py.

You can also see a thorough domain model example with an aggregate root in ./test/test_models.py.

When you're using DDD principles, it's recommended that you start by building out your domain models. This is where your business logic needs to reside. Thus, the domain models can be written w/out specific knowledge of your application and domain models should not depend on any application concerns.

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

cosmic-toolkit-0.6.1.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

cosmic_toolkit-0.6.1-py3-none-any.whl (15.2 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