Skip to main content

eventsourcingdb

The official Python client SDK for EventSourcingDB – a purpose-built database for event sourcing.

The complete documentation of this client SDK, including preconditions, EventQL, observing events, handling errors, Testcontainers, and upgrading, is available at https://www.eventfoundation.io/docs/eventsourcingdb/sdks/python.

Getting Started

Install the client SDK:

pip install eventsourcingdb

Create a client with the URL of your EventSourcingDB instance and the API token to use, and check whether the instance is reachable:

from eventsourcingdb import Client

url = 'http://localhost:3000'
api_token = 'secret'

client = Client(
  base_url = url,
  api_token = api_token,
)

await client.ping()

Write an event:

from eventsourcingdb import EventCandidate

written_events = await client.write_events(
  event_candidates = [
    EventCandidate(
      source = 'https://library.eventsourcingdb.io',
      subject = '/books/42',
      type = 'io.eventsourcingdb.library.book-acquired',
      data = {
        'title': '2001 – A Space Odyssey',
        'author': 'Arthur C. Clarke',
        'isbn': '978-0756906788',
      },
    )
  ]
)

Read the events of a subject:

from eventsourcingdb import ReadEventsOptions

async for event in client.read_events(
  subject = '/books/42',
  options = ReadEventsOptions(
    recursive = False
  ),
):
  pass

For everything else, see the complete documentation.

Metadata

Release files for eventsourcingdb 2.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eventsourcingdb 2.3.2
File Size Uploaded Provenance Actions
eventsourcingdb-2.3.2.tar.gz 32.8 kB Without provenance Details for eventsourcingdb-2.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eventsourcingdb 2.3.2
File Interpreter ABI Platform Actions
eventsourcingdb-2.3.2-py3-none-any.whl Python 3 none any Details for eventsourcingdb-2.3.2-py3-none-any.whl

Total release size: 89.7 kB

Release files / eventsourcingdb-2.3.2.tar.gz

Download URL eventsourcingdb-2.3.2.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
88811884d69de9a1fdd38fbe475c37529785aff3ee265ee31c66b5096ec6daf6
BLAKE2b-256 checksum
How to use checksums
453744503d6b0538e8ee19b447d8e918f1c8fbbfe91fcb34ae6ca6b938b5500d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / eventsourcingdb-2.3.2-py3-none-any.whl

Download URL eventsourcingdb-2.3.2-py3-none-any.whl
Size 56.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
573f6843d8d0de3ee8c7eed1fd04f6301eec303b893377f79deda5a372d8ee0a
BLAKE2b-256 checksum
How to use checksums
2165a0e24f4a62b6484c3ef906027cf9ca7b9e99d71182432340d3b3bf197afe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for eventsourcingdb 2.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.3.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page