Skip to content

lostwire/pyced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

PyCED is a library suite making implementation of Command Query Responsibility Segregation, Event Sourcing and Domain Driven Design a bit easier.

Installation

pip install git+https://github.com/lostwire/pyced.git#egg=pyced

Example

Defining aggregates

import pyced

class UserAccount(pyced.AggregateRoot):
    @pyced.expect_empty
    def create(self, name):
        self.throw('Created', name=name)
    
    @pyced.unpack_event_data
    def apply_Created(self, name)
        self['name'] = name

Instantiating command server

import pyced

server = pyced.init_command('http://event-store')
server.register(UserAccount)
server.run()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages