apexdevkit 1.23.7__tar.gz → 1.23.9__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.7 → apexdevkit-1.23.9}/PKG-INFO +1 -1
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/fake.py +2 -2
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/fluent.py +3 -3
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/httpx/client.py +9 -4
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/sqlite.py +27 -3
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/pyproject.toml +1 -1
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/LICENSE +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/README.md +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/date.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/environment.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/error.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/name.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/request.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/resource.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/fluent.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/httpx/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/httpx/hooks.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/id.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/key_fn.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/query/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/query/generator.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/query/query.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/base.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/decorator.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/mssql.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/repository.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/repository/sql.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/server.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/synchronization.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/testing/rest.py +0 -0
- {apexdevkit-1.23.7 → apexdevkit-1.23.9}/apexdevkit/value.py +0 -0
|
@@ -45,7 +45,7 @@ class FakeHttp:
|
|
|
45
45
|
headers: dict[str, str] = field(default_factory=dict)
|
|
46
46
|
params: dict[str, str] = field(default_factory=dict)
|
|
47
47
|
json: JsonDict = field(default_factory=JsonDict)
|
|
48
|
-
data:
|
|
48
|
+
data: Any = field(default_factory=JsonDict)
|
|
49
49
|
|
|
50
50
|
_request: InterceptedRequest = field(init=False)
|
|
51
51
|
|
|
@@ -67,7 +67,7 @@ class FakeHttp:
|
|
|
67
67
|
|
|
68
68
|
return self
|
|
69
69
|
|
|
70
|
-
def with_data(self, value:
|
|
70
|
+
def with_data(self, value: Any) -> Self:
|
|
71
71
|
self.data = value
|
|
72
72
|
|
|
73
73
|
return self
|
|
@@ -20,7 +20,7 @@ class Http(Protocol): # pragma: no cover
|
|
|
20
20
|
def with_json(self, value: JsonDict) -> Http:
|
|
21
21
|
pass
|
|
22
22
|
|
|
23
|
-
def with_data(self, value:
|
|
23
|
+
def with_data(self, value: Any) -> Http:
|
|
24
24
|
pass
|
|
25
25
|
|
|
26
26
|
def request(self, method: HttpMethod, endpoint: str = "") -> HttpResponse:
|
|
@@ -68,10 +68,10 @@ class FluentHttp:
|
|
|
68
68
|
def with_json(self, value: JsonDict) -> FluentHttp:
|
|
69
69
|
return FluentHttp(self.http.with_json(value))
|
|
70
70
|
|
|
71
|
-
def and_data(self, value:
|
|
71
|
+
def and_data(self, value: Any) -> FluentHttp:
|
|
72
72
|
return self.with_data(value)
|
|
73
73
|
|
|
74
|
-
def with_data(self, value:
|
|
74
|
+
def with_data(self, value: Any) -> FluentHttp:
|
|
75
75
|
return FluentHttp(self.http.with_data(value))
|
|
76
76
|
|
|
77
77
|
def post(self) -> FluentHttpRequest:
|
|
@@ -38,7 +38,7 @@ class Httpx:
|
|
|
38
38
|
def with_param(self, key: str, value: str) -> Httpx:
|
|
39
39
|
return Httpx(self.client, self.config.with_param(key, value))
|
|
40
40
|
|
|
41
|
-
def with_data(self, value:
|
|
41
|
+
def with_data(self, value: Any) -> Httpx:
|
|
42
42
|
return Httpx(self.client, self.config.with_data(value))
|
|
43
43
|
|
|
44
44
|
def with_json(self, value: JsonDict) -> Httpx:
|
|
@@ -120,7 +120,7 @@ class HttpxConfig(Mapping[str, Any]):
|
|
|
120
120
|
headers: JsonDict = field(default_factory=JsonDict)
|
|
121
121
|
params: JsonDict = field(default_factory=JsonDict)
|
|
122
122
|
json: JsonDict | None = None
|
|
123
|
-
data:
|
|
123
|
+
data: Any | None = None
|
|
124
124
|
|
|
125
125
|
def with_endpoint(self, endpoint: str) -> HttpxConfig:
|
|
126
126
|
return HttpxConfig(
|
|
@@ -149,7 +149,7 @@ class HttpxConfig(Mapping[str, Any]):
|
|
|
149
149
|
data=self.data,
|
|
150
150
|
)
|
|
151
151
|
|
|
152
|
-
def with_data(self, value:
|
|
152
|
+
def with_data(self, value: Any) -> HttpxConfig:
|
|
153
153
|
return HttpxConfig(
|
|
154
154
|
endpoint=self.endpoint,
|
|
155
155
|
headers=self.headers,
|
|
@@ -173,9 +173,14 @@ class HttpxConfig(Mapping[str, Any]):
|
|
|
173
173
|
"headers": dict(self.headers),
|
|
174
174
|
"params": dict(self.params),
|
|
175
175
|
"json": dict(self.json) if self.json is not None else None,
|
|
176
|
-
"data":
|
|
176
|
+
"data": self._data() if self.data is not None else None,
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
def _data(self) -> Any:
|
|
180
|
+
if isinstance(self.data, Mapping):
|
|
181
|
+
return dict(self.data)
|
|
182
|
+
return str(self.data)
|
|
183
|
+
|
|
179
184
|
def __len__(self) -> int:
|
|
180
185
|
return len(self.as_dict())
|
|
181
186
|
|
|
@@ -105,14 +105,25 @@ class SqliteTableBuilder(Generic[ItemT]):
|
|
|
105
105
|
table_name: str | None = None
|
|
106
106
|
formatter: Formatter[Mapping[str, Any], ItemT] | None = None
|
|
107
107
|
fields: list[_SqlField] | None = None
|
|
108
|
+
custom_filters: list[str] | None = None
|
|
108
109
|
|
|
109
110
|
def with_name(self, value: str) -> SqliteTableBuilder[ItemT]:
|
|
110
|
-
return SqliteTableBuilder[ItemT](
|
|
111
|
+
return SqliteTableBuilder[ItemT](
|
|
112
|
+
value,
|
|
113
|
+
self.formatter,
|
|
114
|
+
self.fields,
|
|
115
|
+
self.custom_filters,
|
|
116
|
+
)
|
|
111
117
|
|
|
112
118
|
def with_formatter(
|
|
113
119
|
self, value: Formatter[Mapping[str, Any], ItemT]
|
|
114
120
|
) -> SqliteTableBuilder[ItemT]:
|
|
115
|
-
return SqliteTableBuilder[ItemT](
|
|
121
|
+
return SqliteTableBuilder[ItemT](
|
|
122
|
+
self.table_name,
|
|
123
|
+
value,
|
|
124
|
+
self.fields,
|
|
125
|
+
self.custom_filters,
|
|
126
|
+
)
|
|
116
127
|
|
|
117
128
|
def with_fields(self, value: Iterable[_SqlField]) -> SqliteTableBuilder[ItemT]:
|
|
118
129
|
key_list = list(value)
|
|
@@ -135,16 +146,29 @@ class SqliteTableBuilder(Generic[ItemT]):
|
|
|
135
146
|
self.table_name,
|
|
136
147
|
self.formatter,
|
|
137
148
|
key_list,
|
|
149
|
+
self.custom_filters,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
def with_custom_filters(self, filters: Iterable[str]) -> SqliteTableBuilder[ItemT]:
|
|
153
|
+
return SqliteTableBuilder[ItemT](
|
|
154
|
+
self.table_name,
|
|
155
|
+
self.formatter,
|
|
156
|
+
self.fields,
|
|
157
|
+
list(filters),
|
|
138
158
|
)
|
|
139
159
|
|
|
140
160
|
def build(self) -> SqlTable[ItemT]:
|
|
141
161
|
if not self.table_name or not self.formatter or not self.fields:
|
|
142
162
|
raise ValueError("Parameter missing.")
|
|
143
163
|
|
|
164
|
+
field_manager = SqlFieldManager.Builder().with_fields(self.fields)
|
|
165
|
+
if self.custom_filters and len(self.custom_filters) > 0:
|
|
166
|
+
field_manager = field_manager.with_custom_filters(self.custom_filters)
|
|
167
|
+
|
|
144
168
|
return _DefaultSqlTable(
|
|
145
169
|
self.table_name,
|
|
146
170
|
self.formatter,
|
|
147
|
-
|
|
171
|
+
field_manager.for_sqlite().build(),
|
|
148
172
|
)
|
|
149
173
|
|
|
150
174
|
|
|
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
|