neuroglia-python 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/PKG-INFO +1 -2
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/pyproject.toml +1 -1
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/cloud_event.py +27 -4
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/LICENSE +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/README.md +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/core/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/core/module_loader.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/core/operation_result.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/core/problem_details.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/core/type_extensions.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/core/type_finder.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/abstractions.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/abstractions.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/event_sourcing/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/event_sourcing/abstractions.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/event_sourcing/event_sourcing_repository.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/event_sourcing/event_store/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/event_sourcing/event_store/event_store.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/event_sourcing/read_model_reconciliator.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/memory/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/memory/memory_repository.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/mongo/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/mongo/mongo_repository.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/queries/generic/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/queries/generic/get_by_id_query.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/queries/generic/list_query.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/queryable.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/dependency_injection/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/dependency_injection/service_provider.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/decorators.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/infrastructure/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/infrastructure/cloud_event_bus.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/infrastructure/cloud_event_ingestor.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/infrastructure/cloud_event_middleware.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/infrastructure/cloud_event_publisher.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/expressions/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/expressions/javascript_expression_translator.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/hosting/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/hosting/abstractions.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/hosting/configuration/data_access_layer.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/hosting/web.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/integration/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/integration/models.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/mapping/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/mapping/mapper.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/mediation/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/mediation/mediator.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/mvc/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/mvc/controller_base.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/reactive/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/reactive/rx_async.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/serialization/__init__.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/serialization/abstractions.py +0 -0
- {neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/serialization/json.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: neuroglia-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Port from .NET to Python of the Neuroglia Framework
|
|
5
5
|
License: Apache
|
|
6
6
|
Author: Charles d'Avernas
|
|
@@ -9,7 +9,6 @@ Requires-Python: >=3.12,<4.0
|
|
|
9
9
|
Classifier: License :: Other/Proprietary License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
13
12
|
Requires-Dist: annotated-types (>=0.6.0,<0.7.0)
|
|
14
13
|
Requires-Dist: classy-fastapi (>=0.6.1,<0.7.0)
|
|
15
14
|
Requires-Dist: esdbclient (>=1.0.17,<2.0.0)
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/cloud_event.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from dataclasses import dataclass
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import Any, Optional
|
|
3
|
+
from typing import Any, Dict, Optional
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class CloudEventSpecVersion:
|
|
@@ -26,7 +26,7 @@ class CloudEvent:
|
|
|
26
26
|
dataschema (Optional[str]): An URI that references the versioned schema of the event's data.
|
|
27
27
|
data (Optional[Any]): The event's data, if any. Only used if the event has been formatted using the structured mode.
|
|
28
28
|
data_base64 (Optional[str]): The event's binary data, encoded in base 64. Used if the event has been formatted using the binary mode.
|
|
29
|
-
|
|
29
|
+
**extensions: Keyword arguments representing extension attributes.
|
|
30
30
|
'''
|
|
31
31
|
|
|
32
32
|
id: str
|
|
@@ -65,8 +65,31 @@ class CloudEvent:
|
|
|
65
65
|
data_base64: Optional[str] = None
|
|
66
66
|
''' Gets/sets the event's binary data, encoded in base 64. Used if the event has been formatted using the binary mode. '''
|
|
67
67
|
|
|
68
|
+
extensions: Dict[str, Any] = field(default_factory=dict) # Store extensions in a dict
|
|
69
|
+
''' Gets/sets a mapping containing the event's extension attributes. '''
|
|
70
|
+
|
|
71
|
+
def __post_init__(self, *args, **kwargs):
|
|
72
|
+
# Capture any additional keyword arguments as extension attributes
|
|
73
|
+
for key, value in kwargs.items():
|
|
74
|
+
# only add them if they are not already defined fields
|
|
75
|
+
if key not in self.__dataclass_fields__:
|
|
76
|
+
self.extensions[key] = value
|
|
77
|
+
|
|
78
|
+
def __getattr__(self, name):
|
|
79
|
+
# Allow access to extensions as attributes
|
|
80
|
+
if name in self.extensions:
|
|
81
|
+
return self.extensions[name]
|
|
82
|
+
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
|
|
83
|
+
|
|
84
|
+
def __setattr__(self, name, value):
|
|
85
|
+
# Allow setting of extensions as attributes if it is an extension or not a predefined field.
|
|
86
|
+
if name in self.extensions or name not in self.__dataclass_fields__:
|
|
87
|
+
self.extensions[name] = value
|
|
88
|
+
else:
|
|
89
|
+
super().__setattr__(name, value) # Use default setting for standard attributes
|
|
90
|
+
|
|
68
91
|
def get_attribute(self, name: str) -> Optional[Any]:
|
|
69
92
|
''' Gets the value of the attribute with the specified name, if any '''
|
|
70
93
|
if not name:
|
|
71
94
|
raise ValueError("Attribute name cannot be empty or None.")
|
|
72
|
-
self
|
|
95
|
+
return getattr(self, name, None) # Use getattr to check both standard and extension attributes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/__init__.py
RENAMED
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/infrastructure/abstractions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/queries/generic/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/data/queries/generic/list_query.py
RENAMED
|
File without changes
|
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/dependency_injection/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/__init__.py
RENAMED
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/eventing/cloud_events/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{neuroglia_python-0.1.0 → neuroglia_python-0.1.1}/src/neuroglia/serialization/abstractions.py
RENAMED
|
File without changes
|
|
File without changes
|