Skip to content

Commit e182a95

Browse files
authored
feat: Support for EventSourcingDB 0.120.4 (#72)
* Add testcontainers * remove Abstractclient * remove Abstractclient * remove ClientOptions and all dependencies * fix httpclient * clean up code * test start server modified * fix tests * add container * container refactoring to testcontainer.io * spport eventsourcingdb version 0.118.* * fix linting * modify linting in http_client * fix linting in test * fix linting * fix linting for tests * add ping direct in client * fix mix software design oop and func * remove Abstractclass * modify order of imports in client.py * fix issues of PR comments * fix PR comments and linting * add feature run_eventql_query * add feat verify_api_token * fix: linting issues * chore: restructure src code * remove examples * remove packages in __init__.py * remove comment in database.py * remove comments in database.py * remove lowerbound and upperbound validation in client.py * remove comments in container.py * remove comment in test_run_event_ql_query.py and add hash to event.py
1 parent 44f3541 commit e182a95

File tree

91 files changed

+1966
-2919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1966
-2919
lines changed

eventsourcingdb/__init__.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
from .client import Client as EsdbClient
2-
from .client_options import ClientOptions as EsdbClientOptions
1+
from .bound import Bound, BoundType
2+
from .client import Client
3+
from .container import Container
4+
from .event import Event, EventCandidate
5+
from .errors import ClientError, CustomError, InternalError, ServerError, ValidationError
6+
from .observe_events import (
7+
ObserveEventsOptions,
8+
ObserveFromLatestEvent,
9+
IfEventIsMissingDuringObserve
10+
)
11+
from .read_events import ReadEventsOptions, ReadFromLatestEvent, IfEventIsMissingDuringRead, Order
12+
from .read_event_types import EventType
13+
from .write_events import Precondition, IsSubjectOnEventId, IsSubjectPristine
14+
15+
16+
__all__ = [
17+
'Bound', 'BoundType',
18+
'Client',
19+
'Container',
20+
'Event', 'EventCandidate',
21+
'EventType',
22+
'ObserveEventsOptions', 'ObserveFromLatestEvent', 'IfEventIsMissingDuringObserve',
23+
'Precondition', 'IsSubjectOnEventId', 'IsSubjectPristine',
24+
'ReadEventsOptions', 'ReadFromLatestEvent', 'IfEventIsMissingDuringRead', 'Order',
25+
'ClientError', 'CustomError', 'InternalError', 'ServerError', 'ValidationError',
26+
]

eventsourcingdb/abstract_base_client.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

eventsourcingdb/bound.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from dataclasses import dataclass
2+
from enum import Enum
3+
4+
5+
class BoundType(str, Enum):
6+
INCLUSIVE = "inclusive"
7+
EXCLUSIVE = "exclusive"
8+
9+
10+
@dataclass
11+
class Bound:
12+
id: str
13+
type: BoundType
14+
15+
def to_json(self) -> dict[str, str]:
16+
return {
17+
'id': self.id,
18+
'type': self.type.value
19+
}

0 commit comments

Comments
 (0)