apexdevkit 1.32.3__tar.gz → 1.32.5__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.3 → apexdevkit-1.32.5}/PKG-INFO +1 -1
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/service.py +2 -1
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/core/decorator.py +6 -6
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/core/interface.py +4 -4
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/pyproject.toml +1 -1
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/LICENSE +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/README.md +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/date.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/environment.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/error.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/name.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/resource.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/fluent.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/httpx/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/httpx/client.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/httpx/hooks.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/key_fn.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/query/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/query/generator.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/query/query.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/core/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/core/database.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/core/mixin.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/core/multi.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/in_memory/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/in_memory/mixin.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/in_memory/repository.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/in_memory/store.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/sql/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/sql/connector.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/sql/field.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/sql/mssql.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/repository/sql/sqlite.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/security/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/security/core.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/security/hashing.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/server.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/sync/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/sync/observer.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/sync/source.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/sync/sync.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/sync/target.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/apexdevkit/testing/rest.py +0 -0
- {apexdevkit-1.32.3 → apexdevkit-1.32.5}/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 Collection, Iterable, Iterator
|
|
2
2
|
from contextlib import suppress
|
|
3
3
|
from dataclasses import dataclass, field
|
|
4
4
|
|
|
@@ -58,20 +58,20 @@ 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:
|
|
62
|
-
for item in
|
|
61
|
+
def load(self, source: Collection[ItemT]) -> Iterable[ItemT]:
|
|
62
|
+
for item in source:
|
|
63
63
|
with suppress(ExistsError):
|
|
64
64
|
yield self.inner.create(item)
|
|
65
65
|
|
|
66
|
-
def prune(self, source:
|
|
66
|
+
def prune(self, source: Collection[ItemT]) -> Iterable[ItemT]:
|
|
67
67
|
for item in list(self.inner):
|
|
68
68
|
if item not in source:
|
|
69
69
|
with suppress(DoesNotExistError):
|
|
70
70
|
self.inner.delete(item.id)
|
|
71
71
|
yield item
|
|
72
72
|
|
|
73
|
-
def renew(self, source:
|
|
74
|
-
for item in
|
|
73
|
+
def renew(self, source: Collection[ItemT]) -> Iterable[ItemT]:
|
|
74
|
+
for item in source:
|
|
75
75
|
with suppress(DoesNotExistError):
|
|
76
76
|
self.inner.update(item)
|
|
77
77
|
yield 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
|
|
@@ -35,11 +35,11 @@ class Repository(Collection[ItemT], Protocol[ItemT]): # pragma: no cover
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class BatchRepository(Repository[ItemT], Protocol[ItemT]): # pragma: no cover
|
|
38
|
-
def load(self, source:
|
|
38
|
+
def load(self, source: Collection[ItemT]) -> Iterable[ItemT]:
|
|
39
39
|
pass
|
|
40
40
|
|
|
41
|
-
def prune(self, source:
|
|
41
|
+
def prune(self, source: Collection[ItemT]) -> Iterable[ItemT]:
|
|
42
42
|
pass
|
|
43
43
|
|
|
44
|
-
def renew(self, source:
|
|
44
|
+
def renew(self, source: Collection[ItemT]) -> Iterable[ItemT]:
|
|
45
45
|
pass
|
|
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
|