Skip to content

Commit ff710d6

Browse files
committed
remove Abstractclient
1 parent 6a18c00 commit ff710d6

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

eventsourcingdb/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from collections.abc import AsyncGenerator
22

3-
from .abstract_base_client import AbstractBaseClient
43
from .client_configuration import ClientConfiguration
54
from .client_options import ClientOptions
65
from .event.event_candidate import EventCandidate
@@ -23,7 +22,7 @@
2322
# for better readability. Even though it is not necessary,
2423
# it makes the return type clear without needing to read any
2524
# documentation or code.
26-
class Client(AbstractBaseClient):
25+
class Client():
2726
def __init__(
2827
self,
2928
base_url: str,

eventsourcingdb/handlers/observe_events/observe_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ..is_event import is_event
77
from ..is_stream_error import is_stream_error
88
from ..parse_raw_message import parse_raw_message
9-
from ...abstract_base_client import AbstractBaseClient
9+
from ...client import Client
1010
from ...errors.custom_error import CustomError
1111
from ...errors.internal_error import InternalError
1212
from ...errors.invalid_parameter_error import InvalidParameterError
@@ -26,7 +26,7 @@
2626

2727

2828
async def observe_events(
29-
client: AbstractBaseClient,
29+
client: Client,
3030
subject: str,
3131
options: ObserveEventsOptions
3232
) -> AsyncGenerator[StoreItem, None]:

eventsourcingdb/handlers/ping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from http import HTTPStatus
22
import json
3-
from ..abstract_base_client import AbstractBaseClient
3+
from ..client import Client
44
from ..errors.server_error import ServerError
55

66
# Define constants for response values
@@ -13,7 +13,7 @@
1313
PING_RECEIVED_TYPE = "io.eventsourcingdb.api.ping-received"
1414

1515

16-
async def ping(client: AbstractBaseClient) -> None:
16+
async def ping(client: Client) -> None:
1717
response = await client.http_client.get("/api/v1/ping")
1818
response_body = bytes.decode(await response.body.read(), encoding="utf-8")
1919

eventsourcingdb/handlers/read_event_types/read_event_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .is_event_type import is_event_type
66
from ..is_stream_error import is_stream_error
77
from ..parse_raw_message import parse_raw_message
8-
from ...abstract_base_client import AbstractBaseClient
8+
from ...client import Client
99
from ...errors.custom_error import CustomError
1010
from ...errors.internal_error import InternalError
1111
from ...errors.server_error import ServerError
@@ -20,7 +20,7 @@
2020

2121

2222
async def read_event_types(
23-
client: AbstractBaseClient,
23+
client: Client,
2424
) -> AsyncGenerator[EventType, None]:
2525
response: Response
2626
try:

eventsourcingdb/handlers/read_events/read_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import json
33
from http import HTTPStatus
44

5-
from ...abstract_base_client import AbstractBaseClient
5+
from ...client import Client
66
from ...errors.custom_error import CustomError
77
from ...errors.internal_error import InternalError
88
from ...errors.invalid_parameter_error import InvalidParameterError
@@ -25,7 +25,7 @@
2525

2626

2727
async def read_events(
28-
client: AbstractBaseClient,
28+
client: Client,
2929
subject: str,
3030
options: ReadEventsOptions
3131
) -> Generator[StoreItem, None, None]:

eventsourcingdb/handlers/read_subjects/read_subjects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import json
33
from http import HTTPStatus
44

5-
from ...abstract_base_client import AbstractBaseClient
5+
from ...client import Client
66
from ...errors.custom_error import CustomError
77
from ...errors.internal_error import InternalError
88
from ...errors.invalid_parameter_error import InvalidParameterError
@@ -22,7 +22,7 @@
2222

2323

2424
async def read_subjects(
25-
client: AbstractBaseClient,
25+
client: Client,
2626
base_subject: str
2727
) -> AsyncGenerator[str, None, None]:
2828
try:

eventsourcingdb/handlers/register_event_schema/register_event_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from http import HTTPStatus
33
from typing import Any
44

5-
from ...abstract_base_client import AbstractBaseClient
5+
from ...client import Client
66
from ...errors.custom_error import CustomError
77
from ...errors.internal_error import InternalError
88
from ...errors.invalid_parameter_error import InvalidParameterError
@@ -13,7 +13,7 @@
1313

1414

1515
async def register_event_schema(
16-
client: AbstractBaseClient,
16+
client: Client,
1717
event_type: str,
1818
json_schema: dict[str, Any],
1919
) -> None:

eventsourcingdb/handlers/write_events/write_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from http import HTTPStatus
22
import json
33

4-
from ...abstract_base_client import AbstractBaseClient
4+
from ...client import Client
55
from ...errors.custom_error import CustomError
66
from ...errors.internal_error import InternalError
77
from ...errors.invalid_parameter_error import InvalidParameterError
@@ -14,7 +14,7 @@
1414

1515

1616
async def write_events(
17-
client: AbstractBaseClient,
17+
client: Client,
1818
event_candidates: list[EventCandidate],
1919
preconditions: list[Precondition]
2020
) -> list[EventContext]:

0 commit comments

Comments
 (0)