message-van 0.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- message_van/__init__.py +12 -0
- message_van/adapters/__init__.py +8 -0
- message_van/adapters/config_adapter.py +28 -0
- message_van/adapters/mappers/__init__.py +6 -0
- message_van/adapters/mappers/user_config_mapper.py +5 -0
- message_van/adapters/models/__init__.py +6 -0
- message_van/adapters/models/user_config.py +9 -0
- message_van/adapters/signature_adapter.py +119 -0
- message_van/adapters/util/__init__.py +6 -0
- message_van/adapters/util/toml_parser.py +20 -0
- message_van/config.py +3 -0
- message_van/domain/__init__.py +0 -0
- message_van/domain/exceptions/__init__.py +8 -0
- message_van/domain/exceptions/already_registered_handler_error.py +11 -0
- message_van/domain/exceptions/unknown_handler_error.py +10 -0
- message_van/domain/models/__init__.py +32 -0
- message_van/domain/models/base/__init__.py +18 -0
- message_van/domain/models/base/command.py +5 -0
- message_van/domain/models/base/command_handler.py +14 -0
- message_van/domain/models/base/event.py +5 -0
- message_van/domain/models/base/event_handler.py +14 -0
- message_van/domain/models/base/message.py +5 -0
- message_van/domain/models/base/message_handler.py +14 -0
- message_van/domain/models/handler_signature.py +12 -0
- message_van/domain/models/message_handler_type.py +6 -0
- message_van/domain/models/message_handlers.py +69 -0
- message_van/domain/models/message_van.py +59 -0
- message_van/domain/models/unit_of_work.py +16 -0
- message_van/service_layer/__init__.py +6 -0
- message_van/service_layer/service.py +29 -0
- message_van-0.2.4.dist-info/METADATA +17 -0
- message_van-0.2.4.dist-info/RECORD +34 -0
- message_van-0.2.4.dist-info/WHEEL +4 -0
- message_van-0.2.4.dist-info/licenses/LICENSE.txt +10 -0
message_van/__init__.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from message_van.adapters.mappers import dict_to_user_config
|
|
4
|
+
from message_van.adapters.models import UserConfig
|
|
5
|
+
from message_van.adapters.util import get_toml_parser
|
|
6
|
+
from message_van.config import USER_CONFIG_KEY
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ConfigAdapter:
|
|
10
|
+
_parser = get_toml_parser()
|
|
11
|
+
|
|
12
|
+
def __init__(self, config_path: Path):
|
|
13
|
+
self.config_path = config_path
|
|
14
|
+
|
|
15
|
+
def get(self) -> UserConfig:
|
|
16
|
+
config_dict = self._get()
|
|
17
|
+
|
|
18
|
+
return dict_to_user_config(config_dict)
|
|
19
|
+
|
|
20
|
+
def _get(self) -> dict:
|
|
21
|
+
pyproject_dict = self._get_pyproject_dict()
|
|
22
|
+
|
|
23
|
+
return pyproject_dict["tool"][USER_CONFIG_KEY]
|
|
24
|
+
|
|
25
|
+
def _get_pyproject_dict(self) -> dict:
|
|
26
|
+
contents = self.config_path.read_text()
|
|
27
|
+
|
|
28
|
+
return self._parser.loads(contents)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import importlib.util
|
|
3
|
+
import inspect
|
|
4
|
+
from collections.abc import Generator
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any, List, Callable
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from message_van.domain.models import (
|
|
10
|
+
Command,
|
|
11
|
+
Message,
|
|
12
|
+
MessageHandlerType,
|
|
13
|
+
MessageHandlerSignature,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SignatureAdapter:
|
|
18
|
+
def __init__(self, path: Path):
|
|
19
|
+
self.path = path
|
|
20
|
+
|
|
21
|
+
def list(self) -> Generator[MessageHandlerSignature]:
|
|
22
|
+
module_paths = self.get_module_paths()
|
|
23
|
+
modules = self.import_modules(module_paths)
|
|
24
|
+
|
|
25
|
+
for func in list_modules(modules):
|
|
26
|
+
yield get_signature(func)
|
|
27
|
+
|
|
28
|
+
def get_module_paths(self) -> List[Path]:
|
|
29
|
+
return [module_path for module_path in self.list_module_paths()]
|
|
30
|
+
|
|
31
|
+
def list_module_paths(self) -> Generator[Path]:
|
|
32
|
+
for root_path, file_name in self.list_file_names():
|
|
33
|
+
if _is_module(file_name):
|
|
34
|
+
yield root_path / Path(file_name)
|
|
35
|
+
|
|
36
|
+
def list_file_names(self) -> Generator[tuple]:
|
|
37
|
+
for root, _, file_names in os.walk(self.path):
|
|
38
|
+
root_path = Path(root)
|
|
39
|
+
|
|
40
|
+
for file_name in file_names:
|
|
41
|
+
yield root_path, file_name
|
|
42
|
+
|
|
43
|
+
def import_modules(self, module_paths: List[Path]) -> Generator:
|
|
44
|
+
for file_path in module_paths:
|
|
45
|
+
yield self.import_module(file_path)
|
|
46
|
+
|
|
47
|
+
def import_module(self, file_path: str) -> Any:
|
|
48
|
+
module_name = os.path.relpath(file_path, self.path).replace(
|
|
49
|
+
os.sep, "."
|
|
50
|
+
)[:-3]
|
|
51
|
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
|
52
|
+
module = importlib.util.module_from_spec(spec)
|
|
53
|
+
spec.loader.exec_module(module)
|
|
54
|
+
|
|
55
|
+
return module
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _is_module(file_name: str) -> bool:
|
|
59
|
+
return file_name.endswith(".py")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def list_modules(modules: list) -> Generator[Callable]:
|
|
63
|
+
for module in modules:
|
|
64
|
+
for func in list_public_functions(module):
|
|
65
|
+
yield func
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def list_public_functions(module) -> Generator[Callable]:
|
|
69
|
+
for func in _list_functions(module):
|
|
70
|
+
if _is_public_function(func):
|
|
71
|
+
yield func
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _list_functions(module) -> Generator[Callable]:
|
|
75
|
+
for _, func in inspect.getmembers(module, inspect.isfunction):
|
|
76
|
+
yield func
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _is_public_function(func: Callable) -> bool:
|
|
80
|
+
name = func.__name__
|
|
81
|
+
|
|
82
|
+
return not name.startswith("_")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def get_signature(func) -> MessageHandlerSignature:
|
|
86
|
+
param = get_message_param(func)
|
|
87
|
+
|
|
88
|
+
return MessageHandlerSignature(
|
|
89
|
+
message_class_name=get_class_name(param),
|
|
90
|
+
message_handler=func,
|
|
91
|
+
type=get_handler_type(param),
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def get_message_param(func):
|
|
96
|
+
for param in list_params(func):
|
|
97
|
+
if is_message_param(param):
|
|
98
|
+
return param
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def list_params(func) -> Generator:
|
|
102
|
+
signature = inspect.signature(func)
|
|
103
|
+
|
|
104
|
+
yield from signature.parameters.values()
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def is_message_param(param):
|
|
108
|
+
return issubclass(param.annotation, Message)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def get_class_name(param):
|
|
112
|
+
return param.annotation.__name__
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def get_handler_type(param) -> MessageHandlerType:
|
|
116
|
+
if issubclass(param.annotation, Command):
|
|
117
|
+
return MessageHandlerType.COMMAND
|
|
118
|
+
|
|
119
|
+
return MessageHandlerType.EVENT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from types import ModuleType
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
MIN_PYTHON_VERSION_FOR_TOMLI = (3, 11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_toml_parser() -> ModuleType:
|
|
9
|
+
if _is_python_version_compatible_with_tomllib():
|
|
10
|
+
import tomllib
|
|
11
|
+
else:
|
|
12
|
+
import tomli as tomllib
|
|
13
|
+
|
|
14
|
+
return tomllib
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _is_python_version_compatible_with_tomllib() -> bool:
|
|
18
|
+
current_python_version = sys.version_info
|
|
19
|
+
|
|
20
|
+
return current_python_version >= MIN_PYTHON_VERSION_FOR_TOMLI
|
message_van/config.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
_MSG_TEMPLATE = "Handler {handler} is already registered for {type}."
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AlreadyRegisteredHandlerError(Exception):
|
|
5
|
+
def __init__(self, existing_handler, handler_type):
|
|
6
|
+
self.existing_handler = existing_handler
|
|
7
|
+
self.handler_type = handler_type
|
|
8
|
+
|
|
9
|
+
msg = _MSG_TEMPLATE.format(handler=existing_handler, type=handler_type)
|
|
10
|
+
|
|
11
|
+
super().__init__(msg)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from .base import (
|
|
2
|
+
Command,
|
|
3
|
+
CommandHandler,
|
|
4
|
+
Event,
|
|
5
|
+
EventHandler,
|
|
6
|
+
Message,
|
|
7
|
+
MessageHandler,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from .message_handler_type import MessageHandlerType
|
|
11
|
+
|
|
12
|
+
from .handler_signature import MessageHandlerSignature
|
|
13
|
+
|
|
14
|
+
from .message_handlers import MessageHandlers
|
|
15
|
+
from .unit_of_work import UnitOfWork
|
|
16
|
+
|
|
17
|
+
from .message_van import MessageVan
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"Command",
|
|
22
|
+
"CommandHandler",
|
|
23
|
+
"Event",
|
|
24
|
+
"EventHandler",
|
|
25
|
+
"Message",
|
|
26
|
+
"MessageHandler",
|
|
27
|
+
"MessageHandlers",
|
|
28
|
+
"MessageHandlerSignature",
|
|
29
|
+
"MessageHandlerType",
|
|
30
|
+
"MessageVan",
|
|
31
|
+
"UnitOfWork",
|
|
32
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from .message import Message
|
|
2
|
+
|
|
3
|
+
from .command import Command
|
|
4
|
+
from .event import Event
|
|
5
|
+
from .message_handler import MessageHandler
|
|
6
|
+
|
|
7
|
+
from .command_handler import CommandHandler
|
|
8
|
+
from .event_handler import EventHandler
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"Command",
|
|
13
|
+
"CommandHandler",
|
|
14
|
+
"Event",
|
|
15
|
+
"EventHandler",
|
|
16
|
+
"MessageHandler",
|
|
17
|
+
"Message",
|
|
18
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Awaitable, Callable
|
|
2
|
+
|
|
3
|
+
from . import Command
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from message_van.domain.models import MessageVan
|
|
8
|
+
|
|
9
|
+
message_van_type = MessageVan
|
|
10
|
+
else:
|
|
11
|
+
message_van_type = "MessageVan"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
CommandHandler = Callable[[Command, message_van_type], Awaitable[Any]]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Awaitable, Callable
|
|
2
|
+
|
|
3
|
+
from . import Event
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from message_van.domain.models import MessageVan
|
|
8
|
+
|
|
9
|
+
message_van_type = MessageVan
|
|
10
|
+
else:
|
|
11
|
+
message_van_type = "MessageVan"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
EventHandler = Callable[[Event, "MessageVan"], Awaitable[None]]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Awaitable, Callable
|
|
2
|
+
|
|
3
|
+
from . import Message
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from message_van.domain.models import MessageVan
|
|
8
|
+
|
|
9
|
+
message_van_type = MessageVan
|
|
10
|
+
else:
|
|
11
|
+
message_van_type = "MessageVan"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
MessageHandler = Callable[[Message, message_van_type], Awaitable[Any | None]]
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from collections import defaultdict
|
|
2
|
+
|
|
3
|
+
from message_van.domain.exceptions import UnknownHandlerError
|
|
4
|
+
from message_van.domain.models import (
|
|
5
|
+
Command,
|
|
6
|
+
CommandHandler,
|
|
7
|
+
Event,
|
|
8
|
+
EventHandler,
|
|
9
|
+
MessageHandlerSignature,
|
|
10
|
+
MessageHandlerType,
|
|
11
|
+
Message,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class MessageHandlers:
|
|
16
|
+
_command_handlers: dict[str, CommandHandler]
|
|
17
|
+
_event_handlers: dict[str, list[EventHandler]]
|
|
18
|
+
|
|
19
|
+
def __init__(self):
|
|
20
|
+
self._command_handlers = {}
|
|
21
|
+
self._event_handlers = defaultdict(list)
|
|
22
|
+
|
|
23
|
+
def get_handler_for_command(self, command: Command) -> CommandHandler:
|
|
24
|
+
command_name = _get_message_name(command)
|
|
25
|
+
|
|
26
|
+
return self._get_handler_for_command(command_name)
|
|
27
|
+
|
|
28
|
+
def _get_handler_for_command(self, command_name: str) -> CommandHandler:
|
|
29
|
+
try:
|
|
30
|
+
return self._command_handlers[command_name]
|
|
31
|
+
except KeyError:
|
|
32
|
+
raise UnknownHandlerError(command_name)
|
|
33
|
+
|
|
34
|
+
def get_handlers_for_event(self, event: Event) -> list[EventHandler]:
|
|
35
|
+
event_name = _get_message_name(event)
|
|
36
|
+
|
|
37
|
+
return self._get_handlers_for_event(event_name)
|
|
38
|
+
|
|
39
|
+
def _get_handlers_for_event(self, event_name: str) -> list[EventHandler]:
|
|
40
|
+
try:
|
|
41
|
+
return self._event_handlers[event_name]
|
|
42
|
+
except KeyError:
|
|
43
|
+
raise UnknownHandlerError(event_name)
|
|
44
|
+
|
|
45
|
+
def register(self, signature: MessageHandlerSignature) -> None:
|
|
46
|
+
type_ = signature.type
|
|
47
|
+
class_name = signature.message_class_name
|
|
48
|
+
handler = signature.message_handler
|
|
49
|
+
|
|
50
|
+
if type_ == MessageHandlerType.COMMAND:
|
|
51
|
+
self._register_command(class_name, handler)
|
|
52
|
+
else:
|
|
53
|
+
self._register_event(class_name, handler)
|
|
54
|
+
|
|
55
|
+
def _register_command(
|
|
56
|
+
self,
|
|
57
|
+
class_name: str,
|
|
58
|
+
handler: CommandHandler,
|
|
59
|
+
) -> None:
|
|
60
|
+
self._command_handlers[class_name] = handler
|
|
61
|
+
|
|
62
|
+
def _register_event(self, class_name: str, handler: EventHandler) -> None:
|
|
63
|
+
self._event_handlers[class_name].append(handler)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _get_message_name(message: Message) -> str:
|
|
67
|
+
message_class = message.__class__
|
|
68
|
+
|
|
69
|
+
return message_class.__name__
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from asyncio import create_task, gather
|
|
2
|
+
from types import TracebackType
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from message_van.domain.models import CommandHandler, EventHandler
|
|
6
|
+
from message_van.domain.models.base import Command, Event, Message
|
|
7
|
+
|
|
8
|
+
from . import UnitOfWork, MessageHandlers
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MessageVan:
|
|
12
|
+
uow: UnitOfWork
|
|
13
|
+
|
|
14
|
+
_message_handlers: MessageHandlers
|
|
15
|
+
|
|
16
|
+
def __init__(self, unit_of_work: UnitOfWork):
|
|
17
|
+
self.unit_of_work = unit_of_work
|
|
18
|
+
|
|
19
|
+
async def __aenter__(self) -> "MessageVan":
|
|
20
|
+
self.uow = await self.unit_of_work.__aenter__()
|
|
21
|
+
|
|
22
|
+
return self
|
|
23
|
+
|
|
24
|
+
async def __aexit__(
|
|
25
|
+
self,
|
|
26
|
+
exc_type: type[BaseException] | None,
|
|
27
|
+
exc_val: BaseException | None,
|
|
28
|
+
exc_tb: TracebackType | None,
|
|
29
|
+
) -> bool | None:
|
|
30
|
+
await self.unit_of_work.__aexit__(exc_type, exc_val, exc_tb)
|
|
31
|
+
|
|
32
|
+
async def publish(self, message: Message) -> Any | None:
|
|
33
|
+
if isinstance(message, Command):
|
|
34
|
+
return await self.publish_command(message)
|
|
35
|
+
|
|
36
|
+
await self.publish_event(message)
|
|
37
|
+
|
|
38
|
+
async def publish_command(self, command: Command) -> Any:
|
|
39
|
+
handler = self._get_handler_for_command(command)
|
|
40
|
+
|
|
41
|
+
return await handler(command, self)
|
|
42
|
+
|
|
43
|
+
async def publish_event(self, event: Event) -> None:
|
|
44
|
+
tasks = [
|
|
45
|
+
create_task(handler(event, self))
|
|
46
|
+
for handler in self._get_handlers_for_event(event)
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
await gather(*tasks)
|
|
50
|
+
|
|
51
|
+
def _get_handler_for_command(self, command: Command) -> CommandHandler:
|
|
52
|
+
return self._message_handlers.get_handler_for_command(command)
|
|
53
|
+
|
|
54
|
+
def _get_handlers_for_event(self, event: Event) -> list[EventHandler]:
|
|
55
|
+
return self._message_handlers.get_handlers_for_event(event)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def init_handlers(message_handlers: MessageHandlers) -> None:
|
|
59
|
+
MessageVan._message_handlers = message_handlers
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from types import TracebackType
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class UnitOfWork(ABC):
|
|
6
|
+
@abstractmethod
|
|
7
|
+
async def __aenter__(self) -> "UnitOfWork":
|
|
8
|
+
"""Enter the Unit of Work, and return its value."""
|
|
9
|
+
|
|
10
|
+
async def __aexit__(
|
|
11
|
+
self,
|
|
12
|
+
exc_type: type[BaseException] | None,
|
|
13
|
+
exc_val: BaseException | None,
|
|
14
|
+
exc_tb: TracebackType | None,
|
|
15
|
+
) -> bool | None:
|
|
16
|
+
"""Handle termination of the Unit of Work."""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def load_handlers():
|
|
5
|
+
from message_van.adapters import SignatureAdapter
|
|
6
|
+
from message_van.domain.models import (
|
|
7
|
+
MessageHandlers,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
message_handlers = MessageHandlers()
|
|
11
|
+
|
|
12
|
+
path = _get_handlers_path()
|
|
13
|
+
signatures = SignatureAdapter(path)
|
|
14
|
+
|
|
15
|
+
for signature in signatures.list():
|
|
16
|
+
message_handlers.register(signature)
|
|
17
|
+
|
|
18
|
+
return message_handlers
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _get_handlers_path() -> Path:
|
|
22
|
+
from message_van.adapters import ConfigAdapter
|
|
23
|
+
|
|
24
|
+
pyproject_path = Path("pyproject.toml")
|
|
25
|
+
config_adapter = ConfigAdapter(pyproject_path)
|
|
26
|
+
|
|
27
|
+
config = config_adapter.get()
|
|
28
|
+
|
|
29
|
+
return config.handlers_path
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: message-van
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: Python Event-Driven Architecture without the Administration.
|
|
5
|
+
Author-email: Thomas Vanhelden <thomas.vanhelden@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE.txt
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: pydantic==2.10.6
|
|
10
|
+
Requires-Dist: tomli==2.2.1
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Message Van
|
|
14
|
+
|
|
15
|
+
Python Event-Driven Architecture without the Administration.
|
|
16
|
+
|
|
17
|
+

|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
message_van/__init__.py,sha256=zwVDA3MkmxN2c-gL9iP087LdHVFyZLOkFGaLa1Vvshc,235
|
|
2
|
+
message_van/config.py,sha256=XJcrEQoYkD1CCxJTBunwgWsDT0Yj6vBMjiatsZtO1SQ,69
|
|
3
|
+
message_van/adapters/__init__.py,sha256=zQJNllIeBzJZ8Z6XvYPmSanaoCphgxrvWjD-zk4AoU0,151
|
|
4
|
+
message_van/adapters/config_adapter.py,sha256=2naChRSVSPE8f8mztkVTT8WB_BOscPtVenG-NgD8sMg,768
|
|
5
|
+
message_van/adapters/signature_adapter.py,sha256=hCKYha635P8G0lrOP4fbpNaQYtAecuyqC1opE9RLQcs,3141
|
|
6
|
+
message_van/adapters/mappers/__init__.py,sha256=XevMqXcHm3EB_4Ty5AuY739mEY7QTyLKG8Wjm9nRRaM,95
|
|
7
|
+
message_van/adapters/mappers/user_config_mapper.py,sha256=BGLy3z0RTUpG69f2RcvU6BJ7AmqUa0nzdFD6PzmfbZE,161
|
|
8
|
+
message_van/adapters/models/__init__.py,sha256=rFn6iIYO8wkYWZA-JZNOmXOMC-cCfVAS9dZb87SwWsQ,70
|
|
9
|
+
message_van/adapters/models/user_config.py,sha256=Vrcx91ERmBNRfNzIOBB4G0gKvjyFPeYqRJx20AogaJU,202
|
|
10
|
+
message_van/adapters/util/__init__.py,sha256=aB5itX59dHwtufBqfMoWeMTL8j6OZRTfJ45Fe0mxR5g,80
|
|
11
|
+
message_van/adapters/util/toml_parser.py,sha256=w3dRg_8CSXPw6z8qufMQaaDYRkP8Dz-7kNmtmiwMX50,431
|
|
12
|
+
message_van/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
message_van/domain/exceptions/__init__.py,sha256=pjcdMSRhjdWlBUJF8vZd6jvFsVJyHT8MiWZTeFEDv_Y,211
|
|
14
|
+
message_van/domain/exceptions/already_registered_handler_error.py,sha256=tWA-zVVxv1yiLwNwtcBlnqqoHkMIqjnukZCx6-EpALo,378
|
|
15
|
+
message_van/domain/exceptions/unknown_handler_error.py,sha256=MJxeQuaJMgfJi34TFtw8-87nhYVFY_BvRRH8kC9pqE0,257
|
|
16
|
+
message_van/domain/models/__init__.py,sha256=tCxxS7AKm8U9xZdUO699GxUNxcSEbm1wWJO_rmTJE98,587
|
|
17
|
+
message_van/domain/models/handler_signature.py,sha256=XpQntGTBSDNiSIrUkESm0tPmimf9Lrnx4vi-ihS9wxo,226
|
|
18
|
+
message_van/domain/models/message_handler_type.py,sha256=HKEoMO9c78mI2NB-AVN61J3wVrTiNfGpg9k5uYijPyU,86
|
|
19
|
+
message_van/domain/models/message_handlers.py,sha256=QZK3zLKsMOl5It7x5ttUtXlptZmSaPLlIjEflpZodWE,2106
|
|
20
|
+
message_van/domain/models/message_van.py,sha256=UIwklzizYBHZWjywMTfq1d4C-fSC2YCTr7Jhe-ZV-9Q,1824
|
|
21
|
+
message_van/domain/models/unit_of_work.py,sha256=mq-oiMpfQwLrlWMNeGU0rRRckraeQlg6N3d2VT6N4KQ,460
|
|
22
|
+
message_van/domain/models/base/__init__.py,sha256=AWiR64HliwC0U9Wh-H7VHLmGO7Q7U4GtUQZm30cFnvQ,336
|
|
23
|
+
message_van/domain/models/base/command.py,sha256=wED_0B4yqS_Zx5lZ_AoiwG5oKBBm3NAIiHBWYnTEToU,78
|
|
24
|
+
message_van/domain/models/base/command_handler.py,sha256=cV54Q_QkMYxjTzjhhNXQ9oZQFlg1EARlXM4vp00a6WY,305
|
|
25
|
+
message_van/domain/models/base/event.py,sha256=x-OzoDiVQSLDaO4vrFWKwBhr4VCGmcoLXnGAdibbOdE,74
|
|
26
|
+
message_van/domain/models/base/event_handler.py,sha256=o-3n4Goa3CbDecNABU7_MQYCqul3wTOYCwRDOF75Z1A,291
|
|
27
|
+
message_van/domain/models/base/message.py,sha256=SsXsW1HQ7viW3lL6UpmCTuI52dQtSAxTCseWPkbD1uU,89
|
|
28
|
+
message_van/domain/models/base/message_handler.py,sha256=lzTGoohBq1Z_RpTp4lmKaHv7Qvcqca9NNjI5h-H4Rng,312
|
|
29
|
+
message_van/service_layer/__init__.py,sha256=bgw_JOkWVmXrEoSTRZZwSP40xKbyj5SAGYKaicOOSGM,72
|
|
30
|
+
message_van/service_layer/service.py,sha256=oniGbSxkNDHGcMIkz8pz3lOpg4snKzkRzCEky1mSnTM,658
|
|
31
|
+
message_van-0.2.4.dist-info/METADATA,sha256=pcniYNzFDEFxU_ZfAtrh3zHHQfMN7ADx5zuYVlpv01I,456
|
|
32
|
+
message_van-0.2.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
33
|
+
message_van-0.2.4.dist-info/licenses/LICENSE.txt,sha256=LF_pnwYdvRHVi3Z2xBjQ0PWdhwisXbCta2i3EqhAEGk,1079
|
|
34
|
+
message_van-0.2.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) <year> <copyright holders>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|