Installation

Use pip to install the library from the Python Package Index.

$ pip install eventsourcing

If you want to use SQLAlchemy, then install the library with the ‘sqlalchemy’ option.

$ pip install eventsourcing[sqlalchemy]

Running the install command with again different options will just install the extra dependencies associated with that option. If you installed without any options, you can easily install optional dependencies later by running the install command again with the options you want.

You can use SQLAlchemy with SQLite, otherwise please also install a database driver that works with your database system.

$ pip install psycopg2-binary  # for PostgreSQL
$ pip install pymysql          # for MySQL

Similarly, if you want to use Django, then please install with the ‘django’ option.

$ pip install eventsourcing[django]

See the Infrastructure doc for more information about particular database drivers and connection strings.

If you want to use Apache Cassandra, then please install with the ‘cassandra’ option.

$ pip install eventsourcing[cassandra]

If you want to run the tests, then please install with the ‘tests’ option.

$ pip install eventsourcing[tests]

If you want build the docs, then please install with the ‘docs’ option.

$ pip install eventsourcing[docs]