1- Please note: following the rebranding of EventStoreDB to KurrentDB, this package has
2- been rebranded as [ ` eventsourcing-kurrentdb ` ] ( https://pypi.org/project/eventsourcing-kurrentdb ) . Please
1+ Please note: following the rebranding of EventStoreDB to KurrentDB, this package is
2+ the rebranding of [ ` eventsourcing-eventstoredb ` ] ( https://pypi.org/project/eventsourcing-eventstoredb ) . Please
33migrate your code to use the [ ` eventsourcing-kurrentdb ` ] ( https://pypi.org/project/eventsourcing-kurrentdb )
44package when you are ready.
55
66# Event Sourcing in Python with KurrentDB
77
88This is an extension package for the Python [ eventsourcing] ( https://github.com/pyeventsourcing/eventsourcing ) library
9- that provides a persistence module for [ EventStoreDB and KurrentDB] ( https://www.kurrent.io ) .
9+ that provides a persistence module for [ KurrentDB] ( https://www.kurrent.io ) .
1010It uses the [ kurrentdbclient] ( https://github.com/pyeventsourcing/kurrentdbclient )
11- package to communicate with EventStoreDB and KurrentDB via the gRPC interface.
11+ package to communicate with KurrentDB via the gRPC interface.
1212
1313## Installation
1414
15- Use pip to install the [ stable distribution] ( https://pypi.org/project/eventsourcing-eventstoredb / )
15+ Use pip to install the [ stable distribution] ( https://pypi.org/project/eventsourcing-kurrentdb / )
1616from the Python Package Index.
1717
18- $ pip install eventsourcing-eventstoredb
18+ $ pip install eventsourcing-kurrentdb
1919
2020Please note, it is recommended to install Python packages into a Python virtual environment.
2121
2222## Getting started
2323
2424Define aggregates and applications in the usual way. Please note, "streams"
25- in EventStoreDB and KurrentDB are constrained to start from position ` 0 ` , and this
25+ in KurrentDB are constrained to start from position ` 0 ` , and this
2626package expects the ` originator_version ` of the first event in an aggregate sequence
2727to be ` 0 ` , so you must set ` INITIAL_VERSION ` on your aggregate classes to ` 0 ` .
2828
@@ -58,7 +58,7 @@ class TrainingSchool(Application):
5858
5959
6060class Dog (Aggregate ):
61- INITIAL_VERSION = 0 # for EventStoreDB and KurrentDB
61+ INITIAL_VERSION = 0 # for KurrentDB
6262
6363 @ staticmethod
6464 def create_id (name : str ):
@@ -79,43 +79,43 @@ class DogDetails(TypedDict):
7979 tricks: Tuple[str , ... ]
8080```
8181
82- Configure the ` TrainingSchool ` application to use EventStoreDB or KurrentDB by setting
83- the environment variable ` PERSISTENCE_MODULE ` to ` 'eventsourcing_eventstoredb ' ` . You
82+ Configure the ` TrainingSchool ` application to use KurrentDB by setting
83+ the environment variable ` PERSISTENCE_MODULE ` to ` 'eventsourcing_kurrentdb ' ` . You
8484can do this in actual environment variables, or by passing in an ` env ` argument when
8585constructing the application object, or by setting ` env ` on the application class.
8686
8787``` python
8888import os
8989
90- os.environ[' TRAININGSCHOOL_PERSISTENCE_MODULE' ] = ' eventsourcing_eventstoredb '
90+ os.environ[' TRAININGSCHOOL_PERSISTENCE_MODULE' ] = ' eventsourcing_kurrentdb '
9191```
9292
93- Also set environment variable ` EVENTSTOREDB_URI ` to an EventStoreDB
94- or KurrentDB connection string URI. This value will be used as the ` uri `
95- argument when the ` KurrentDBClient ` class is constructed by this package.
93+ Also set environment variable ` KURRENTDB_URI ` to an KurrentDB connection
94+ string URI. This value will be used as the ` uri ` argument when the ` KurrentDBClient `
95+ class is constructed by this package.
9696
9797``` python
98- os.environ[' EVENTSTOREDB_URI ' ] = ' esdb://localhost:2113?Tls=false'
98+ os.environ[' KURRENTDB_URI ' ] = ' esdb://localhost:2113?Tls=false'
9999```
100100
101- If you are connecting to a "secure" EventStoreDB or KurrentDB server, unless
101+ If you are connecting to a "secure" KurrentDB server, unless
102102the root certificate of the certificate authority used to generate the
103103server's certificate is installed locally, then also set environment
104- variable ` EVENTSTOREDB_ROOT_CERTIFICATES ` to an SSL/TLS certificate
105- suitable for making a secure gRPC connection to the EventStoreDB server(s).
104+ variable ` KURRENTDB_ROOT_CERTIFICATES ` to an SSL/TLS certificate
105+ suitable for making a secure gRPC connection to the KurrentDB server(s).
106106This value will be used as the ` root_certificates ` argument when the
107107` KurrentDBClient ` class is constructed by this package.
108108
109109
110110``` python
111- os.environ[' EVENTSTOREDB_ROOT_CERTIFICATES ' ] = ' <PEM encoded SSL/TLS root certificates>'
111+ os.environ[' KURRENTDB_ROOT_CERTIFICATES ' ] = ' <PEM encoded SSL/TLS root certificates>'
112112```
113113
114114Please refer to the [ kurrentdbclient] ( https://github.com/pyeventsourcing/kurrentdbclient )
115- documentation for details about starting a "secure" or "insecure" EventStoreDB
116- server, and the "esdb " and "esdb +discover" EventStoreDB connection string
115+ documentation for details about starting a "secure" or "insecure" KurrentDB
116+ server, and the "kdb " and "kdb +discover" KurrentDB connection string
117117URI schemes, and how to obtain a suitable SSL/TLS certificate for use
118- in the client when connecting to a "secure" EventStoreDB server.
118+ in the client when connecting to a "secure" KurrentDB server.
119119
120120Construct the application.
121121
@@ -357,10 +357,6 @@ from the [Python website](https://www.python.org/downloads/).
357357Once project dependencies have been installed, you should be able to run tests
358358from within PyCharm (right-click on the ` tests ` folder and select the 'Run' option).
359359
360- Because of a conflict between pytest and PyCharm's debugger and the coverage tool,
361- you may need to add `` --no-cov `` as an option to the test runner template. Alternatively,
362- just use the Python Standard Library's `` unittest `` module.
363-
364360You should also be able to open a terminal window in PyCharm, and run the project's
365361Makefile commands from the command line (see below).
366362
@@ -387,17 +383,17 @@ and creating the Poetry virtual environment using PyCharm (see above).
387383
388384### Project Makefile commands
389385
390- You can start EventStoreDB using the following command.
386+ You can start KurrentDB using the following command.
391387
392- $ make start-eventstoredb
388+ $ make start-kurrentdb
393389
394- You can run tests using the following command (needs EventStoreDB to be running).
390+ You can run tests using the following command (needs KurrentDB to be running).
395391
396392 $ make test
397393
398- You can stop EventStoreDB using the following command.
394+ You can stop KurrentDB using the following command.
399395
400- $ make stop-eventstoredb
396+ $ make stop-kurrentdb
401397
402398You can check the formatting of the code using the following command.
403399
@@ -407,7 +403,7 @@ You can reformat the code using the following command.
407403
408404 $ make fmt
409405
410- Tests belong in ` ./tests ` . Code-under-test belongs in ` ./eventsourcing_eventstoredb ` .
406+ Tests belong in ` ./tests ` . Code-under-test belongs in ` ./eventsourcing_kurrentdb ` .
411407
412408Edit package dependencies in ` pyproject.toml ` . Update ` poetry.lock ` and installed packages
413409using the following command.
0 commit comments