Kant: Event Sourcing and CQRS

https://badges.frapsoft.com/os/mit/mit.png?v=103 https://travis-ci.org/patrickporto/kant.svg?branch=master https://codecov.io/github/patrickporto/kant/coverage.svg?branch=master https://img.shields.io/pypi/v/kant.svg https://img.shields.io/pypi/pyversions/kant.svg https://img.shields.io/pypi/implementation/kant.svg

Kant is a framework for Event Sourcing and CQRS for Python with a focus on simplicity a performance.

Here’s what it looks like:

from kant.eventstore import connect

await connect(user='user', password='user', database='database')

# create event store for bank_account
conn.create_keyspace('bank_account')

# create events
bank_account_created = BankAccountCreated(
    id=123,
    owner='John Doe',
)
deposit_performed = DepositPerformed(
    amount=20,
)

bank_account = BankAccount()
bank_account.dispatch([bank_account_created, deposit_performed])
bank_account.save()

stored_bank_account = BankAccount.objects.get(123)

Kant is licensed under the MIT and it officially supports Python 3.5 or later.

Get It Now

$ pip install kant

User Guide

This part of the documentation is focused primarily on teaching you how to use Kant.

Installation

Kant supports Python versions 3.5 and up and is installable via pip or from source.

Via pip

To install kant, simply run the following command in a terminal:

$ pip install -U kant

If you don’t have pip installed, check out this this guide.

Via Source Code

To install the latest development version of dramatiq from source, clone the repo from GitHub

$ get clone https://github.com/patrickporto/kant

then install it to your local site-packages by running

$ python setup.py install

in the cloned directory.

Events

TODO

Commands

TODO

Read model projections

TODO

Event Store

TODO

Testing

TODO

API Reference

This part of the documentation is focused on detailing the various bits and pieces of the Kant developer interface.

API Reference