apexdevkit 1.32.4__tar.gz → 1.32.6__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.32.4 → apexdevkit-1.32.6}/PKG-INFO +1 -1
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/service.py +2 -1
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/core/decorator.py +8 -9
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/core/interface.py +2 -2
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/pyproject.toml +1 -1
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/LICENSE +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/README.md +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/date.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/environment.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/error.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/name.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/resource.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/fluent.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/httpx/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/httpx/client.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/httpx/hooks.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/key_fn.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/query/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/query/generator.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/query/query.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/core/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/core/database.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/core/mixin.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/core/multi.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/in_memory/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/in_memory/mixin.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/in_memory/repository.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/in_memory/store.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/sql/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/sql/connector.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/sql/field.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/sql/mssql.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/repository/sql/sqlite.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/security/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/security/core.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/security/hashing.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/server.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/sync/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/sync/observer.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/sync/source.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/sync/sync.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/sync/target.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/testing/rest.py +0 -0
- {apexdevkit-1.32.4 → apexdevkit-1.32.6}/apexdevkit/value.py +0 -0
|
@@ -8,6 +8,7 @@ from typing import Any, Generic
|
|
|
8
8
|
from apexdevkit.formatter import Formatter
|
|
9
9
|
from apexdevkit.repository import BruteForceBatch, Repository
|
|
10
10
|
from apexdevkit.repository.core import ItemT
|
|
11
|
+
from apexdevkit.repository.core.interface import BatchRepository
|
|
11
12
|
|
|
12
13
|
RawItem = Mapping[str, Any]
|
|
13
14
|
RawCollection = Iterable[RawItem]
|
|
@@ -66,7 +67,7 @@ class RestfulRepository(RestfulService, Generic[ItemT]):
|
|
|
66
67
|
formatter: Formatter[Mapping[str, Any], ItemT]
|
|
67
68
|
|
|
68
69
|
@cached_property
|
|
69
|
-
def _batch(self) ->
|
|
70
|
+
def _batch(self) -> BatchRepository[ItemT]:
|
|
70
71
|
return BruteForceBatch(inner=self.repository)
|
|
71
72
|
|
|
72
73
|
def create_one(self, item: RawItem) -> RawItem:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import
|
|
1
|
+
from collections.abc import Iterable, Iterator
|
|
2
2
|
from contextlib import suppress
|
|
3
3
|
from dataclasses import dataclass, field
|
|
4
4
|
|
|
@@ -58,19 +58,18 @@ class RepositoryDecorator(Repository[ItemT]): # pragma: no cover
|
|
|
58
58
|
|
|
59
59
|
@dataclass(frozen=True, kw_only=True)
|
|
60
60
|
class BruteForceBatch(RepositoryDecorator[ItemT]):
|
|
61
|
-
def load(self, source:
|
|
61
|
+
def load(self, source: Iterable[ItemT]) -> Iterable[ItemT]:
|
|
62
62
|
for item in source:
|
|
63
63
|
with suppress(ExistsError):
|
|
64
64
|
yield self.inner.create(item)
|
|
65
65
|
|
|
66
|
-
def prune(self, source:
|
|
67
|
-
for item in
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
yield item
|
|
66
|
+
def prune(self, source: Iterable[ItemT]) -> Iterable[ItemT]:
|
|
67
|
+
for item in source:
|
|
68
|
+
with suppress(DoesNotExistError):
|
|
69
|
+
self.inner.delete(item.id)
|
|
70
|
+
yield item
|
|
72
71
|
|
|
73
|
-
def renew(self, source:
|
|
72
|
+
def renew(self, source: Iterable[ItemT]) -> Iterable[ItemT]:
|
|
74
73
|
for item in source:
|
|
75
74
|
with suppress(DoesNotExistError):
|
|
76
75
|
self.inner.update(item)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from collections.abc import Callable, Collection,
|
|
3
|
+
from collections.abc import Callable, Collection, Iterable
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from typing import Protocol, TypeVar
|
|
6
6
|
from uuid import uuid4
|
|
@@ -38,7 +38,7 @@ class BatchRepository(Repository[ItemT], Protocol[ItemT]): # pragma: no cover
|
|
|
38
38
|
def load(self, source: Iterable[ItemT]) -> Iterable[ItemT]:
|
|
39
39
|
pass
|
|
40
40
|
|
|
41
|
-
def prune(self, source:
|
|
41
|
+
def prune(self, source: Iterable[ItemT]) -> Iterable[ItemT]:
|
|
42
42
|
pass
|
|
43
43
|
|
|
44
44
|
def renew(self, source: Iterable[ItemT]) -> Iterable[ItemT]:
|
|
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
|
|
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
|