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.
API Reference¶
This part of the documentation is focused on detailing the various bits and pieces of the Kant developer interface.