Package: dvent
Dventis a minimal set of simple, immutable, and functional models and tools
intended to supportDomain Driven Design(DDD) and function as the
source-of-truth data model in aCQRS/Event sourcingarchitecture pattern.Installationpip install dventDvent isA libraryA set of tools from which to build rich solutions, not a solution which you
may easily apply to an existing problem.  It aims to guide your development
of models that are robust, simple, scalable, easy to reason about, and easy
to test.  While opinionated about the manner in which you model event
orchestration it is still up to you to implement that model.MinimalOnly include what is necessary and eschew that which is not;
allow for easy expansion and compositionSimpleAim for simplicity over ease of use; this generally manifests in very
explicit code with consistent naming, loose-coupling, composition, and no “magic”ImmutableWith help from theexcellentpyrsistentlibrary all data structures and
patterns follow and reinforce immutable best-practices; so all state
transitions require reassignment and all entities (Events, Commands,
Aggregates) are hashable.FunctionalPrefer functional patterns to classic OOP while retaining a style that is
approachable for developers familiar with more classic Python idioms.Fully Specified and TestedDvent is developed with DDD itself and features living documentation in the
form of Gherkin features.  Long-term plans include implementation of multiple
languages against the same specification.Beta SoftwareWhile Dvent is currently in use in an enterprise-level setting, it is still
provided as Beta software until further scaling and consistency guarantees are
tested.Dvent is notA frameworkDvent implements no “real-world” or practical data persistence and because it
knows nothing about your problem domain it does not attempt to provide a
solution.  Instead it aims to guide your development of models that are robust,
simple, scalable, easy to reason about, and easy to test.  For something more
fully-featured and “out-of-the-box” take a look at the excellently documentedeventsourcingproject which implements many of the same (and more) patterns.UsageComing Soon - for now check out the sample notebook(s)!ExploringDvent includes integration with theJupyterproject via a docker image. To use the notebook(s) you’ll need docker version17.09.0+and can simply runDVENT_JUPYTER_TYOKEN=<password-or-token-value> docker-compose up -d dvent-notebookNote: this will download and build the images which may require a good internet connectionThen in your browser visityour personal notebook, enter your
password/token from above, browse to the “notebooks” folder, and open any you like.TestingAll tests are currently done viabehaveand gherkin feature files.  To run the test
suite you can use docker viadocker-compose run --rm dvent-testWhy make “Dvent”?I was leading a team atDiscogsbuilding a new “greenfield” project which needed a basic
set of event-sourcing models which were immutable, unopinionated about implementation
details, and enabled basic functional patterns.  I couldn’t find anything that quite
fit the need, so I made one over an intense weekend and we’ve been using it without
any major modifications for over 15 months as of release0.1.0(May 2018).It’s very plausible that withoutDiscogsI would never have written Dvent and even so not
considered it as vialble enterprise-level software.  I consider it the birthplace and indirect
sponsor of the project.Why the name “Dvent”?Anextremeportmanteau of:Domain Driven DesignDiscogsEventObilgatorynaming thingsis hard reference ;)Special ThanksDiscogsand my team members (you know who you are)!The excellentpyrsistentlibrary which makes working with data structures in
Python almost as joyful as in ClojureGreg Youngfor his many helpful talks, posts, etc. which inform much of this
library’s patternsRich Hickeyand the broaderClojurecommunity for the inspiration in
building practical, immutable, functional solutions