Showing dry-python.

A set of libraries for pluggable business logic components.

GitHub: https://github.com/dry-python
Twitter: https://twitter.com/dry_py

  • Domain-driven design friendly.
  • Optimized for readability.
  • Simplifies decomposition.
  • Simplifies error handling.
  • Simplifies debugging.
  • Framework ready. Lots of contrib packages to integrate with the existing ecosystem.

Service layer:

  • stories Define a user story in the business transaction DSL.
  • returns Make your functions return something meaningful, typed, and safe!

Repository layer:

  • mappers Declarative mappers from ORM models to domain entities. And back again!

Configuration and bootstrap:

  • dependencies Dependency Injection for Humans.

Examples

  • tutorials example of the Django project written this way.
8 Likes

This is an interesting project, thanks for sharing. It chimes with some stuff I’ve been working on recently.

I can see an immediate use for the mappers in my work.
I’ve been trying to make a practical implementation of ports and adapters in Django. I want to keep the helpful stuff that’s driven from models - model forms, rest serialisers, factory boy, hypothesis integration - but separate the domain objects from the persistence layer.

Is this related to your goals for this project?
Are there other helpful bits in there that I haven’t caught on to yet?

Thanks,
Ronan