Kant: Event Sourcing and CQRS¶

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.
Events¶
TODO
Commands¶
TODO
Read model projections¶
TODO
Event Store¶
TODO
Testing¶
TODO