apexdevkit 1.23.2__tar.gz → 1.23.4__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.23.2 → apexdevkit-1.23.4}/PKG-INFO +1 -1
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/in_memory.py +15 -1
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/server.py +13 -2
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/pyproject.toml +1 -1
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/LICENSE +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/README.md +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/environment.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/error.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/name.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/request.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/resource.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/fluent.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/httpx/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/httpx/client.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/httpx/hooks.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/id.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/key_fn.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/query/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/query/generator.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/query/query.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/base.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/decorator.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/mssql.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/repository.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/sql.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/repository/sqlite.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/synchronization.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/testing/rest.py +0 -0
- {apexdevkit-1.23.2 → apexdevkit-1.23.4}/apexdevkit/value.py +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from collections
|
|
3
|
+
from collections import defaultdict
|
|
4
|
+
from collections.abc import Callable, Iterable, Iterator, MutableMapping
|
|
4
5
|
from contextlib import suppress
|
|
5
6
|
from dataclasses import dataclass, field
|
|
6
7
|
from typing import Any, Generic, Protocol, Self
|
|
@@ -102,6 +103,19 @@ class InMemoryByteStore(Generic[ItemT]):
|
|
|
102
103
|
for raw in self.items.values():
|
|
103
104
|
yield self.formatter.load(raw)
|
|
104
105
|
|
|
106
|
+
@dataclass
|
|
107
|
+
class Cache:
|
|
108
|
+
items: MutableMapping[str, InMemoryByteStore[Any]] = field(init=False)
|
|
109
|
+
|
|
110
|
+
def __post_init__(self) -> None:
|
|
111
|
+
self.items = defaultdict(InMemoryByteStore)
|
|
112
|
+
|
|
113
|
+
def store_for(self, name: str) -> InMemoryByteStore[Any]:
|
|
114
|
+
return self.items[name]
|
|
115
|
+
|
|
116
|
+
def clear(self) -> None:
|
|
117
|
+
self.items.clear()
|
|
118
|
+
|
|
105
119
|
|
|
106
120
|
@dataclass
|
|
107
121
|
class _SingleKeyRepository(RepositoryBase[ItemT]):
|
|
@@ -74,6 +74,14 @@ class UvicornServer:
|
|
|
74
74
|
class Sentry:
|
|
75
75
|
dsn: str = environment_variable("SENTRY_DSN", default="")
|
|
76
76
|
release: str = environment_variable("RELEASE", default="unknown")
|
|
77
|
+
trace_sample_rate: str = environment_variable(
|
|
78
|
+
"SENTRY_TRACE_SAMPLE_RATE",
|
|
79
|
+
default="0.2",
|
|
80
|
+
)
|
|
81
|
+
profile_sample_rate: str = environment_variable(
|
|
82
|
+
"SENTRY_PROFILE_SAMPLE_RATE",
|
|
83
|
+
default="0.2",
|
|
84
|
+
)
|
|
77
85
|
|
|
78
86
|
def setup(self) -> None:
|
|
79
87
|
if not self.dsn:
|
|
@@ -81,8 +89,11 @@ class Sentry:
|
|
|
81
89
|
|
|
82
90
|
sentry_sdk.init(
|
|
83
91
|
release=self.release,
|
|
84
|
-
traces_sample_rate=
|
|
85
|
-
profiles_sample_rate=
|
|
92
|
+
traces_sample_rate=float(self.trace_sample_rate),
|
|
93
|
+
profiles_sample_rate=float(self.profile_sample_rate),
|
|
94
|
+
_experiments={
|
|
95
|
+
"enable_logs": True,
|
|
96
|
+
},
|
|
86
97
|
)
|
|
87
98
|
|
|
88
99
|
|
|
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
|