apexdevkit 1.5.9__tar.gz → 1.5.11__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.
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/PKG-INFO +1 -1
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/service.py +4 -3
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/formatter.py +3 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/pyproject.toml +1 -1
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/LICENSE +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/README.md +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/error.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/http/httpx.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/repository/base.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.5.9 → apexdevkit-1.5.11}/apexdevkit/testing/rest.py +0 -0
|
@@ -96,11 +96,12 @@ class _RestfulNestedRepository(RestfulService, Generic[ItemT]):
|
|
|
96
96
|
return [self.formatter.dump(item) for item in self.repository]
|
|
97
97
|
|
|
98
98
|
def update_one(self, item_id: str, **with_fields: Any) -> RawItem:
|
|
99
|
-
|
|
99
|
+
data = self.formatter.dump(self.repository.read(item_id))
|
|
100
|
+
data.update(**with_fields)
|
|
100
101
|
|
|
101
|
-
self.repository.update(
|
|
102
|
+
self.repository.update(self.formatter.load(data))
|
|
102
103
|
|
|
103
|
-
return
|
|
104
|
+
return data
|
|
104
105
|
|
|
105
106
|
def update_many(self, items: RawCollection) -> RawCollection:
|
|
106
107
|
result = [self.formatter.load(fields) for fields in items]
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from copy import deepcopy
|
|
1
2
|
from dataclasses import asdict, dataclass, field
|
|
2
3
|
from typing import Any, Generic, Protocol, Self, TypeVar
|
|
3
4
|
|
|
@@ -26,6 +27,8 @@ class DataclassFormatter(Generic[ItemT]):
|
|
|
26
27
|
return self
|
|
27
28
|
|
|
28
29
|
def load(self, raw: dict[str, Any]) -> ItemT:
|
|
30
|
+
raw = deepcopy(raw)
|
|
31
|
+
|
|
29
32
|
for key, formatter in self.sub_formatters.items():
|
|
30
33
|
raw[key] = formatter.load(raw.pop(key))
|
|
31
34
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|