fmtr.tools 1.3.13__tar.gz → 1.3.14__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.
Potentially problematic release.
This version of fmtr.tools might be problematic. Click here for more details.
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/PKG-INFO +45 -45
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/dns_tools/dm.py +19 -3
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/dns_tools/server.py +37 -11
- fmtr_tools-1.3.14/fmtr/tools/version +1 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr.tools.egg-info/PKG-INFO +45 -45
- fmtr_tools-1.3.13/fmtr/tools/version +0 -1
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/LICENSE +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/README.md +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/ai_tools/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/ai_tools/agentic_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/ai_tools/inference_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/api_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/async_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/augmentation_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/caching_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/constants.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/data_modelling_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/dataclass_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/datatype_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/debugging_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/dns_tools/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/dns_tools/client.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/dns_tools/proxy.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/docker_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/entrypoints/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/entrypoints/cache_hfh.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/entrypoints/ep_test.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/entrypoints/install_yamlscript.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/entrypoints/remote_debug_test.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/entrypoints/shell_debug.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/environment_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/function_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/google_api_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/hash_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/hfh_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/html_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/http_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/import_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/inspection_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/interface_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/iterator_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/json_fix_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/json_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/logging_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/merging_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/metric_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/name_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/netrc_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/openai_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/packaging_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/parallel_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/path_tools/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/path_tools/app_path_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/path_tools/path_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/path_tools/type_path_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/pattern_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/pdf_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/platform_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/process_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/profiling_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/random_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/semantic_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/settings_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/setup_tools/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/setup_tools/setup_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/spaces_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/string_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tabular_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/conftest.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/helpers.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/test_datatype.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/test_environment.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/test_json.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/test_path.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tests/test_yaml.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tokenization_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/unicode_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/version_tools/__init__.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/version_tools/version_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr/tools/yaml_tools.py +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr.tools.egg-info/SOURCES.txt +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr.tools.egg-info/dependency_links.txt +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr.tools.egg-info/entry_points.txt +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr.tools.egg-info/requires.txt +44 -44
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/fmtr.tools.egg-info/top_level.txt +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/pyproject.toml +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/setup.cfg +0 -0
- {fmtr_tools-1.3.13 → fmtr_tools-1.3.14}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.14
|
|
4
4
|
Summary: Collection of high-level tools to simplify everyday development tasks, with a focus on AI/ML
|
|
5
5
|
Home-page: https://github.com/fmtr/fmtr.tools
|
|
6
6
|
Author: Frontmatter
|
|
@@ -126,61 +126,61 @@ Requires-Dist: logfire[httpx]; extra == "http"
|
|
|
126
126
|
Provides-Extra: setup
|
|
127
127
|
Requires-Dist: setuptools; extra == "setup"
|
|
128
128
|
Provides-Extra: all
|
|
129
|
-
Requires-Dist:
|
|
130
|
-
Requires-Dist:
|
|
131
|
-
Requires-Dist:
|
|
132
|
-
Requires-Dist: pytest-cov; extra == "all"
|
|
133
|
-
Requires-Dist: httpx_retries; extra == "all"
|
|
134
|
-
Requires-Dist: logfire; extra == "all"
|
|
129
|
+
Requires-Dist: deepmerge; extra == "all"
|
|
130
|
+
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
131
|
+
Requires-Dist: fastapi; extra == "all"
|
|
135
132
|
Requires-Dist: bokeh; extra == "all"
|
|
136
|
-
Requires-Dist:
|
|
137
|
-
Requires-Dist:
|
|
138
|
-
Requires-Dist:
|
|
133
|
+
Requires-Dist: pydantic; extra == "all"
|
|
134
|
+
Requires-Dist: tabulate; extra == "all"
|
|
135
|
+
Requires-Dist: dask[bag]; extra == "all"
|
|
136
|
+
Requires-Dist: openpyxl; extra == "all"
|
|
137
|
+
Requires-Dist: filetype; extra == "all"
|
|
138
|
+
Requires-Dist: pymupdf; extra == "all"
|
|
139
|
+
Requires-Dist: docker; extra == "all"
|
|
139
140
|
Requires-Dist: flet-webview; extra == "all"
|
|
141
|
+
Requires-Dist: dnspython[doh]; extra == "all"
|
|
142
|
+
Requires-Dist: logfire; extra == "all"
|
|
143
|
+
Requires-Dist: contexttimer; extra == "all"
|
|
144
|
+
Requires-Dist: torchvision; extra == "all"
|
|
145
|
+
Requires-Dist: huggingface_hub; extra == "all"
|
|
140
146
|
Requires-Dist: transformers[sentencepiece]; extra == "all"
|
|
141
|
-
Requires-Dist:
|
|
142
|
-
Requires-Dist:
|
|
143
|
-
Requires-Dist:
|
|
144
|
-
Requires-Dist: Unidecode; extra == "all"
|
|
145
|
-
Requires-Dist: pymupdf; extra == "all"
|
|
146
|
-
Requires-Dist: appdirs; extra == "all"
|
|
147
|
+
Requires-Dist: cachetools; extra == "all"
|
|
148
|
+
Requires-Dist: httpx; extra == "all"
|
|
149
|
+
Requires-Dist: semver; extra == "all"
|
|
147
150
|
Requires-Dist: sre_yield; extra == "all"
|
|
148
|
-
Requires-Dist:
|
|
149
|
-
Requires-Dist:
|
|
151
|
+
Requires-Dist: html2text; extra == "all"
|
|
152
|
+
Requires-Dist: pyyaml; extra == "all"
|
|
153
|
+
Requires-Dist: google-auth; extra == "all"
|
|
154
|
+
Requires-Dist: regex; extra == "all"
|
|
155
|
+
Requires-Dist: httpx_retries; extra == "all"
|
|
156
|
+
Requires-Dist: tokenizers; extra == "all"
|
|
157
|
+
Requires-Dist: sentence_transformers; extra == "all"
|
|
150
158
|
Requires-Dist: flet-video; extra == "all"
|
|
151
|
-
Requires-Dist: diskcache; extra == "all"
|
|
152
|
-
Requires-Dist: yamlscript; extra == "all"
|
|
153
159
|
Requires-Dist: pymupdf4llm; extra == "all"
|
|
154
|
-
Requires-Dist:
|
|
155
|
-
Requires-Dist:
|
|
156
|
-
Requires-Dist: google-auth; extra == "all"
|
|
160
|
+
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
161
|
+
Requires-Dist: pytest-cov; extra == "all"
|
|
157
162
|
Requires-Dist: logfire[httpx]; extra == "all"
|
|
163
|
+
Requires-Dist: ollama; extra == "all"
|
|
164
|
+
Requires-Dist: faker; extra == "all"
|
|
165
|
+
Requires-Dist: torchaudio; extra == "all"
|
|
166
|
+
Requires-Dist: pandas; extra == "all"
|
|
167
|
+
Requires-Dist: google-api-python-client; extra == "all"
|
|
158
168
|
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
169
|
+
Requires-Dist: appdirs; extra == "all"
|
|
170
|
+
Requires-Dist: flet[all]; extra == "all"
|
|
171
|
+
Requires-Dist: setuptools; extra == "all"
|
|
172
|
+
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
173
|
+
Requires-Dist: yamlscript; extra == "all"
|
|
174
|
+
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
159
175
|
Requires-Dist: tinynetrc; extra == "all"
|
|
160
|
-
Requires-Dist:
|
|
161
|
-
Requires-Dist:
|
|
162
|
-
Requires-Dist: pydantic; extra == "all"
|
|
163
|
-
Requires-Dist:
|
|
164
|
-
Requires-Dist:
|
|
165
|
-
Requires-Dist: httpx; extra == "all"
|
|
166
|
-
Requires-Dist: tabulate; extra == "all"
|
|
167
|
-
Requires-Dist: huggingface_hub; extra == "all"
|
|
168
|
-
Requires-Dist: regex; extra == "all"
|
|
169
|
-
Requires-Dist: openpyxl; extra == "all"
|
|
170
|
-
Requires-Dist: dask[bag]; extra == "all"
|
|
176
|
+
Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
|
|
177
|
+
Requires-Dist: Unidecode; extra == "all"
|
|
178
|
+
Requires-Dist: pydantic-settings; extra == "all"
|
|
179
|
+
Requires-Dist: json_repair; extra == "all"
|
|
180
|
+
Requires-Dist: peft; extra == "all"
|
|
171
181
|
Requires-Dist: distributed; extra == "all"
|
|
172
182
|
Requires-Dist: openai; extra == "all"
|
|
173
|
-
Requires-Dist:
|
|
174
|
-
Requires-Dist: json_repair; extra == "all"
|
|
175
|
-
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
176
|
-
Requires-Dist: contexttimer; extra == "all"
|
|
177
|
-
Requires-Dist: semver; extra == "all"
|
|
178
|
-
Requires-Dist: pydantic-settings; extra == "all"
|
|
179
|
-
Requires-Dist: flet[all]; extra == "all"
|
|
180
|
-
Requires-Dist: cachetools; extra == "all"
|
|
181
|
-
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
182
|
-
Requires-Dist: torchaudio; extra == "all"
|
|
183
|
-
Requires-Dist: torchvision; extra == "all"
|
|
183
|
+
Requires-Dist: diskcache; extra == "all"
|
|
184
184
|
Dynamic: author
|
|
185
185
|
Dynamic: author-email
|
|
186
186
|
Dynamic: description
|
|
@@ -2,6 +2,7 @@ import dns
|
|
|
2
2
|
import httpx
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from dns import rcode as dnsrcode
|
|
5
|
+
from dns import reversename
|
|
5
6
|
from dns.message import Message, QueryMessage
|
|
6
7
|
from dns.rrset import RRset
|
|
7
8
|
from functools import cached_property
|
|
@@ -37,6 +38,7 @@ class Response(BaseDNSData):
|
|
|
37
38
|
|
|
38
39
|
http: Optional[httpx.Response] = None
|
|
39
40
|
is_complete: bool = False
|
|
41
|
+
blocked_by: Optional[str] = None
|
|
40
42
|
|
|
41
43
|
@classmethod
|
|
42
44
|
def from_http(cls, response: httpx.Response) -> Self:
|
|
@@ -142,14 +144,16 @@ class Exchange:
|
|
|
142
144
|
|
|
143
145
|
request: Request
|
|
144
146
|
response: Optional[Response] = None
|
|
147
|
+
is_internal: bool = False
|
|
148
|
+
client_name: Optional[str] = None
|
|
149
|
+
|
|
145
150
|
|
|
146
151
|
|
|
147
152
|
@classmethod
|
|
148
|
-
def from_wire(cls, wire: bytes,
|
|
153
|
+
def from_wire(cls, wire: bytes, **kwargs) -> Self:
|
|
149
154
|
request = Request(wire)
|
|
150
155
|
response = Response.from_message(request.get_response_template())
|
|
151
|
-
|
|
152
|
-
return cls(request=request, response=response, ip=ip, port=port)
|
|
156
|
+
return cls(request=request, response=response, **kwargs)
|
|
153
157
|
|
|
154
158
|
@cached_property
|
|
155
159
|
def client(self):
|
|
@@ -202,3 +206,15 @@ class Exchange:
|
|
|
202
206
|
"""
|
|
203
207
|
data = tuple(self.request.question.to_text().split())
|
|
204
208
|
return data
|
|
209
|
+
|
|
210
|
+
@cached_property
|
|
211
|
+
def reverse(self) -> Self:
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
Create an Exchange for a reverse lookup of this Exchange's client IP.
|
|
215
|
+
|
|
216
|
+
"""
|
|
217
|
+
name = reversename.from_address(self.ip)
|
|
218
|
+
query = dns.message.make_query(name, dns.rdatatype.PTR)
|
|
219
|
+
exchange = self.__class__.from_wire(query.to_wire(), ip=self.ip, port=self.port, is_internal=True)
|
|
220
|
+
return exchange
|
|
@@ -68,22 +68,51 @@ class Plain:
|
|
|
68
68
|
exchange.response.message.id = exchange.request.message.id
|
|
69
69
|
exchange.response.is_complete = True
|
|
70
70
|
|
|
71
|
-
def
|
|
71
|
+
def get_span(self, exchange: Exchange):
|
|
72
72
|
"""
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Get handling span
|
|
75
75
|
|
|
76
76
|
"""
|
|
77
77
|
request = exchange.request
|
|
78
|
+
span = logger.span(
|
|
79
|
+
f'Handling request {exchange.client_name=} {request.message.id=} {request.type_text} {request.name_text} {request.question=}...'
|
|
80
|
+
)
|
|
81
|
+
return span
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
def log_response(self, exchange: Exchange):
|
|
84
|
+
"""
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
Log when resolution complete
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
request = exchange.request
|
|
90
|
+
response = exchange.response
|
|
91
|
+
|
|
92
|
+
logger.info(
|
|
93
|
+
f'Resolution complete {exchange.client_name=} {request.message.id=} {request.type_text} {request.name_text} {request.question=} {response.is_complete=} {response.rcode=} {response.rcode_text=} {response.answer=} {response.blocked_by=}...'
|
|
84
94
|
)
|
|
85
|
-
with span:
|
|
86
95
|
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def handle(self, exchange: Exchange):
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
Check validity of request, reverse lookup client address, check presence in cache and resolve.
|
|
102
|
+
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
if not exchange.request.is_valid:
|
|
106
|
+
raise ValueError(f'Only one question per request is supported. Got {len(exchange.request.question)} questions.')
|
|
107
|
+
|
|
108
|
+
if not exchange.is_internal:
|
|
109
|
+
self.handle(exchange.reverse)
|
|
110
|
+
client_name = exchange.reverse.question_last.name.to_text()
|
|
111
|
+
if not exchange.reverse.response.answer:
|
|
112
|
+
logger.warning(f'Client name could not be resolved {client_name=}.')
|
|
113
|
+
exchange.client_name = client_name
|
|
114
|
+
|
|
115
|
+
with self.get_span(exchange):
|
|
87
116
|
with logger.span(f'Checking cache...'):
|
|
88
117
|
self.check_cache(exchange)
|
|
89
118
|
|
|
@@ -92,9 +121,6 @@ class Plain:
|
|
|
92
121
|
exchange.response.is_complete = True
|
|
93
122
|
|
|
94
123
|
self.cache[exchange.key] = exchange.response
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
attribs = dict(rcode=exchange.response.rcode, rcode_text=exchange.response.rcode_text)
|
|
98
|
-
span.set_attributes(attribs)
|
|
124
|
+
self.log_response(exchange)
|
|
99
125
|
|
|
100
126
|
return exchange
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.3.14
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.14
|
|
4
4
|
Summary: Collection of high-level tools to simplify everyday development tasks, with a focus on AI/ML
|
|
5
5
|
Home-page: https://github.com/fmtr/fmtr.tools
|
|
6
6
|
Author: Frontmatter
|
|
@@ -126,61 +126,61 @@ Requires-Dist: logfire[httpx]; extra == "http"
|
|
|
126
126
|
Provides-Extra: setup
|
|
127
127
|
Requires-Dist: setuptools; extra == "setup"
|
|
128
128
|
Provides-Extra: all
|
|
129
|
-
Requires-Dist:
|
|
130
|
-
Requires-Dist:
|
|
131
|
-
Requires-Dist:
|
|
132
|
-
Requires-Dist: pytest-cov; extra == "all"
|
|
133
|
-
Requires-Dist: httpx_retries; extra == "all"
|
|
134
|
-
Requires-Dist: logfire; extra == "all"
|
|
129
|
+
Requires-Dist: deepmerge; extra == "all"
|
|
130
|
+
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
131
|
+
Requires-Dist: fastapi; extra == "all"
|
|
135
132
|
Requires-Dist: bokeh; extra == "all"
|
|
136
|
-
Requires-Dist:
|
|
137
|
-
Requires-Dist:
|
|
138
|
-
Requires-Dist:
|
|
133
|
+
Requires-Dist: pydantic; extra == "all"
|
|
134
|
+
Requires-Dist: tabulate; extra == "all"
|
|
135
|
+
Requires-Dist: dask[bag]; extra == "all"
|
|
136
|
+
Requires-Dist: openpyxl; extra == "all"
|
|
137
|
+
Requires-Dist: filetype; extra == "all"
|
|
138
|
+
Requires-Dist: pymupdf; extra == "all"
|
|
139
|
+
Requires-Dist: docker; extra == "all"
|
|
139
140
|
Requires-Dist: flet-webview; extra == "all"
|
|
141
|
+
Requires-Dist: dnspython[doh]; extra == "all"
|
|
142
|
+
Requires-Dist: logfire; extra == "all"
|
|
143
|
+
Requires-Dist: contexttimer; extra == "all"
|
|
144
|
+
Requires-Dist: torchvision; extra == "all"
|
|
145
|
+
Requires-Dist: huggingface_hub; extra == "all"
|
|
140
146
|
Requires-Dist: transformers[sentencepiece]; extra == "all"
|
|
141
|
-
Requires-Dist:
|
|
142
|
-
Requires-Dist:
|
|
143
|
-
Requires-Dist:
|
|
144
|
-
Requires-Dist: Unidecode; extra == "all"
|
|
145
|
-
Requires-Dist: pymupdf; extra == "all"
|
|
146
|
-
Requires-Dist: appdirs; extra == "all"
|
|
147
|
+
Requires-Dist: cachetools; extra == "all"
|
|
148
|
+
Requires-Dist: httpx; extra == "all"
|
|
149
|
+
Requires-Dist: semver; extra == "all"
|
|
147
150
|
Requires-Dist: sre_yield; extra == "all"
|
|
148
|
-
Requires-Dist:
|
|
149
|
-
Requires-Dist:
|
|
151
|
+
Requires-Dist: html2text; extra == "all"
|
|
152
|
+
Requires-Dist: pyyaml; extra == "all"
|
|
153
|
+
Requires-Dist: google-auth; extra == "all"
|
|
154
|
+
Requires-Dist: regex; extra == "all"
|
|
155
|
+
Requires-Dist: httpx_retries; extra == "all"
|
|
156
|
+
Requires-Dist: tokenizers; extra == "all"
|
|
157
|
+
Requires-Dist: sentence_transformers; extra == "all"
|
|
150
158
|
Requires-Dist: flet-video; extra == "all"
|
|
151
|
-
Requires-Dist: diskcache; extra == "all"
|
|
152
|
-
Requires-Dist: yamlscript; extra == "all"
|
|
153
159
|
Requires-Dist: pymupdf4llm; extra == "all"
|
|
154
|
-
Requires-Dist:
|
|
155
|
-
Requires-Dist:
|
|
156
|
-
Requires-Dist: google-auth; extra == "all"
|
|
160
|
+
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
161
|
+
Requires-Dist: pytest-cov; extra == "all"
|
|
157
162
|
Requires-Dist: logfire[httpx]; extra == "all"
|
|
163
|
+
Requires-Dist: ollama; extra == "all"
|
|
164
|
+
Requires-Dist: faker; extra == "all"
|
|
165
|
+
Requires-Dist: torchaudio; extra == "all"
|
|
166
|
+
Requires-Dist: pandas; extra == "all"
|
|
167
|
+
Requires-Dist: google-api-python-client; extra == "all"
|
|
158
168
|
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
169
|
+
Requires-Dist: appdirs; extra == "all"
|
|
170
|
+
Requires-Dist: flet[all]; extra == "all"
|
|
171
|
+
Requires-Dist: setuptools; extra == "all"
|
|
172
|
+
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
173
|
+
Requires-Dist: yamlscript; extra == "all"
|
|
174
|
+
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
159
175
|
Requires-Dist: tinynetrc; extra == "all"
|
|
160
|
-
Requires-Dist:
|
|
161
|
-
Requires-Dist:
|
|
162
|
-
Requires-Dist: pydantic; extra == "all"
|
|
163
|
-
Requires-Dist:
|
|
164
|
-
Requires-Dist:
|
|
165
|
-
Requires-Dist: httpx; extra == "all"
|
|
166
|
-
Requires-Dist: tabulate; extra == "all"
|
|
167
|
-
Requires-Dist: huggingface_hub; extra == "all"
|
|
168
|
-
Requires-Dist: regex; extra == "all"
|
|
169
|
-
Requires-Dist: openpyxl; extra == "all"
|
|
170
|
-
Requires-Dist: dask[bag]; extra == "all"
|
|
176
|
+
Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
|
|
177
|
+
Requires-Dist: Unidecode; extra == "all"
|
|
178
|
+
Requires-Dist: pydantic-settings; extra == "all"
|
|
179
|
+
Requires-Dist: json_repair; extra == "all"
|
|
180
|
+
Requires-Dist: peft; extra == "all"
|
|
171
181
|
Requires-Dist: distributed; extra == "all"
|
|
172
182
|
Requires-Dist: openai; extra == "all"
|
|
173
|
-
Requires-Dist:
|
|
174
|
-
Requires-Dist: json_repair; extra == "all"
|
|
175
|
-
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
176
|
-
Requires-Dist: contexttimer; extra == "all"
|
|
177
|
-
Requires-Dist: semver; extra == "all"
|
|
178
|
-
Requires-Dist: pydantic-settings; extra == "all"
|
|
179
|
-
Requires-Dist: flet[all]; extra == "all"
|
|
180
|
-
Requires-Dist: cachetools; extra == "all"
|
|
181
|
-
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
182
|
-
Requires-Dist: torchaudio; extra == "all"
|
|
183
|
-
Requires-Dist: torchvision; extra == "all"
|
|
183
|
+
Requires-Dist: diskcache; extra == "all"
|
|
184
184
|
Dynamic: author
|
|
185
185
|
Dynamic: author-email
|
|
186
186
|
Dynamic: description
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.3.13
|
|
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
|
|
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
|
|
@@ -14,61 +14,61 @@ pydantic-ai[logfire,openai]
|
|
|
14
14
|
ollama
|
|
15
15
|
|
|
16
16
|
[all]
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
pytest-cov
|
|
21
|
-
httpx_retries
|
|
22
|
-
logfire
|
|
17
|
+
deepmerge
|
|
18
|
+
google-auth-httplib2
|
|
19
|
+
fastapi
|
|
23
20
|
bokeh
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
pydantic
|
|
22
|
+
tabulate
|
|
23
|
+
dask[bag]
|
|
24
|
+
openpyxl
|
|
25
|
+
filetype
|
|
26
|
+
pymupdf
|
|
27
|
+
docker
|
|
27
28
|
flet-webview
|
|
29
|
+
dnspython[doh]
|
|
30
|
+
logfire
|
|
31
|
+
contexttimer
|
|
32
|
+
torchvision
|
|
33
|
+
huggingface_hub
|
|
28
34
|
transformers[sentencepiece]
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Unidecode
|
|
33
|
-
pymupdf
|
|
34
|
-
appdirs
|
|
35
|
+
cachetools
|
|
36
|
+
httpx
|
|
37
|
+
semver
|
|
35
38
|
sre_yield
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
html2text
|
|
40
|
+
pyyaml
|
|
41
|
+
google-auth
|
|
42
|
+
regex
|
|
43
|
+
httpx_retries
|
|
44
|
+
tokenizers
|
|
45
|
+
sentence_transformers
|
|
38
46
|
flet-video
|
|
39
|
-
diskcache
|
|
40
|
-
yamlscript
|
|
41
47
|
pymupdf4llm
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
google-auth
|
|
48
|
+
google-auth-oauthlib
|
|
49
|
+
pytest-cov
|
|
45
50
|
logfire[httpx]
|
|
51
|
+
ollama
|
|
52
|
+
faker
|
|
53
|
+
torchaudio
|
|
54
|
+
pandas
|
|
55
|
+
google-api-python-client
|
|
46
56
|
uvicorn[standard]
|
|
57
|
+
appdirs
|
|
58
|
+
flet[all]
|
|
59
|
+
setuptools
|
|
60
|
+
logfire[fastapi]
|
|
61
|
+
yamlscript
|
|
62
|
+
pydevd-pycharm~=251.25410.159
|
|
47
63
|
tinynetrc
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
pydantic
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
httpx
|
|
54
|
-
tabulate
|
|
55
|
-
huggingface_hub
|
|
56
|
-
regex
|
|
57
|
-
openpyxl
|
|
58
|
-
dask[bag]
|
|
64
|
+
pydantic-ai[logfire,openai]
|
|
65
|
+
Unidecode
|
|
66
|
+
pydantic-settings
|
|
67
|
+
json_repair
|
|
68
|
+
peft
|
|
59
69
|
distributed
|
|
60
70
|
openai
|
|
61
|
-
|
|
62
|
-
json_repair
|
|
63
|
-
google-auth-oauthlib
|
|
64
|
-
contexttimer
|
|
65
|
-
semver
|
|
66
|
-
pydantic-settings
|
|
67
|
-
flet[all]
|
|
68
|
-
cachetools
|
|
69
|
-
logfire[fastapi]
|
|
70
|
-
torchaudio
|
|
71
|
-
torchvision
|
|
71
|
+
diskcache
|
|
72
72
|
|
|
73
73
|
[api]
|
|
74
74
|
fastapi
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|