fmtr.tools 1.3.20__py3-none-any.whl → 1.3.22__py3-none-any.whl

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/api_tools.py CHANGED
@@ -24,7 +24,7 @@ class Endpoint:
24
24
  self.tags = enlist(self.tags)
25
25
 
26
26
 
27
- class ApiBase:
27
+ class Base:
28
28
  """
29
29
 
30
30
  Simple API base class, generalising endpoint-as-method config.
@@ -33,6 +33,8 @@ class ApiBase:
33
33
  TITLE = 'Base API'
34
34
  HOST = '0.0.0.0'
35
35
  PORT = 8080
36
+ SWAGGER_PARAMS = dict(tryItOutEnabled=True)
37
+ URL_DOCS = '/docs'
36
38
 
37
39
  def add_endpoint(self, endpoint: Endpoint):
38
40
  """
@@ -51,7 +53,7 @@ class ApiBase:
51
53
  )(endpoint.method)
52
54
 
53
55
  def __init__(self):
54
- self.app = FastAPI(title=self.TITLE)
56
+ self.app = FastAPI(title=self.TITLE, swagger_ui_parameters=self.SWAGGER_PARAMS, docs_url=self.URL_DOCS)
55
57
  logger.instrument_fastapi(self.app)
56
58
 
57
59
  for endpoint in self.get_endpoints():
@@ -95,4 +97,4 @@ class ApiBase:
95
97
 
96
98
 
97
99
  if __name__ == '__main__':
98
- ApiBase.launch()
100
+ Base.launch()
@@ -2,5 +2,6 @@ from fmtr.tools.import_tools import MissingExtraMockModule
2
2
 
3
3
  try:
4
4
  from fmtr.tools.dns_tools import server, client, dm, proxy
5
+ import dns
5
6
  except ImportError as exception:
6
- server = client = dm = proxy = MissingExtraMockModule('dns', exception)
7
+ dns = server = client = dm = proxy = MissingExtraMockModule('dns', exception)
fmtr/tools/version CHANGED
@@ -1 +1 @@
1
- 1.3.20
1
+ 1.3.22
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmtr.tools
3
- Version: 1.3.20
3
+ Version: 1.3.22
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: json_repair; extra == "all"
129
+ Requires-Dist: contexttimer; extra == "all"
130
+ Requires-Dist: httpx; extra == "all"
130
131
  Requires-Dist: huggingface_hub; extra == "all"
131
- Requires-Dist: Unidecode; extra == "all"
132
- Requires-Dist: sre_yield; extra == "all"
133
- Requires-Dist: deepmerge; extra == "all"
134
- Requires-Dist: pytest-cov; extra == "all"
135
- Requires-Dist: openpyxl; extra == "all"
136
- Requires-Dist: fastapi; extra == "all"
137
- Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
138
- Requires-Dist: google-auth-oauthlib; extra == "all"
139
- Requires-Dist: appdirs; extra == "all"
140
- Requires-Dist: logfire[httpx]; extra == "all"
141
- Requires-Dist: faker; extra == "all"
142
- Requires-Dist: filetype; extra == "all"
143
- Requires-Dist: torchaudio; extra == "all"
144
- Requires-Dist: setuptools; extra == "all"
145
- Requires-Dist: regex; extra == "all"
132
+ Requires-Dist: tinynetrc; extra == "all"
133
+ Requires-Dist: json_repair; extra == "all"
134
+ Requires-Dist: google-auth-httplib2; extra == "all"
135
+ Requires-Dist: distributed; extra == "all"
136
+ Requires-Dist: yamlscript; extra == "all"
146
137
  Requires-Dist: flet-video; extra == "all"
147
- Requires-Dist: pymupdf4llm; extra == "all"
148
- Requires-Dist: pydantic-settings; extra == "all"
149
- Requires-Dist: pydantic; extra == "all"
150
- Requires-Dist: dnspython[doh]; extra == "all"
151
- Requires-Dist: google-api-python-client; extra == "all"
152
- Requires-Dist: sentence_transformers; extra == "all"
153
- Requires-Dist: diskcache; extra == "all"
154
- Requires-Dist: tabulate; extra == "all"
155
- Requires-Dist: dask[bag]; extra == "all"
156
138
  Requires-Dist: pandas; extra == "all"
157
- Requires-Dist: cachetools; extra == "all"
158
- Requires-Dist: bokeh; extra == "all"
159
- Requires-Dist: contexttimer; extra == "all"
160
- Requires-Dist: docker; extra == "all"
139
+ Requires-Dist: filetype; extra == "all"
161
140
  Requires-Dist: logfire; extra == "all"
141
+ Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
142
+ Requires-Dist: regex; extra == "all"
143
+ Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
162
144
  Requires-Dist: logfire[fastapi]; extra == "all"
163
- Requires-Dist: tokenizers; extra == "all"
164
- Requires-Dist: transformers[sentencepiece]; extra == "all"
165
- Requires-Dist: pymupdf; extra == "all"
145
+ Requires-Dist: pydantic-settings; extra == "all"
166
146
  Requires-Dist: torchvision; extra == "all"
167
- Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
147
+ Requires-Dist: openai; extra == "all"
148
+ Requires-Dist: sre_yield; extra == "all"
149
+ Requires-Dist: logfire[httpx]; extra == "all"
150
+ Requires-Dist: pymupdf4llm; extra == "all"
151
+ Requires-Dist: pymupdf; extra == "all"
152
+ Requires-Dist: faker; extra == "all"
153
+ Requires-Dist: uvicorn[standard]; extra == "all"
154
+ Requires-Dist: pytest-cov; extra == "all"
168
155
  Requires-Dist: google-auth; extra == "all"
169
- Requires-Dist: distributed; extra == "all"
170
- Requires-Dist: html2text; extra == "all"
171
- Requires-Dist: httpx; extra == "all"
156
+ Requires-Dist: appdirs; extra == "all"
157
+ Requires-Dist: google-api-python-client; extra == "all"
158
+ Requires-Dist: docker; extra == "all"
159
+ Requires-Dist: dnspython[doh]; extra == "all"
160
+ Requires-Dist: transformers[sentencepiece]; extra == "all"
161
+ Requires-Dist: dask[bag]; extra == "all"
162
+ Requires-Dist: flet-webview; extra == "all"
163
+ Requires-Dist: diskcache; extra == "all"
164
+ Requires-Dist: tokenizers; extra == "all"
172
165
  Requires-Dist: httpx_retries; extra == "all"
173
- Requires-Dist: pyyaml; extra == "all"
174
- Requires-Dist: flet[all]; extra == "all"
166
+ Requires-Dist: Unidecode; extra == "all"
167
+ Requires-Dist: cachetools; extra == "all"
168
+ Requires-Dist: openpyxl; extra == "all"
169
+ Requires-Dist: tabulate; extra == "all"
175
170
  Requires-Dist: peft; extra == "all"
176
- Requires-Dist: openai; extra == "all"
177
171
  Requires-Dist: semver; extra == "all"
178
- Requires-Dist: tinynetrc; extra == "all"
179
- Requires-Dist: uvicorn[standard]; extra == "all"
180
- Requires-Dist: flet-webview; extra == "all"
181
- Requires-Dist: google-auth-httplib2; extra == "all"
182
- Requires-Dist: yamlscript; extra == "all"
172
+ Requires-Dist: deepmerge; extra == "all"
173
+ Requires-Dist: fastapi; extra == "all"
174
+ Requires-Dist: flet[all]; extra == "all"
175
+ Requires-Dist: sentence_transformers; extra == "all"
176
+ Requires-Dist: bokeh; extra == "all"
177
+ Requires-Dist: torchaudio; extra == "all"
178
+ Requires-Dist: pyyaml; extra == "all"
179
+ Requires-Dist: setuptools; extra == "all"
180
+ Requires-Dist: pydantic; extra == "all"
181
+ Requires-Dist: html2text; extra == "all"
183
182
  Requires-Dist: ollama; extra == "all"
183
+ Requires-Dist: google-auth-oauthlib; extra == "all"
184
184
  Dynamic: author
185
185
  Dynamic: author-email
186
186
  Dynamic: description
@@ -1,5 +1,5 @@
1
1
  fmtr/tools/__init__.py,sha256=sjXo4eRDOPp20zlLpJqaB48h7RQXKJd_RwR3fwD6oGk,5731
2
- fmtr/tools/api_tools.py,sha256=u2uEw-5OGN-eU4bNMC7ef5nmopVZTPyVN5eb_rr8ZS0,2140
2
+ fmtr/tools/api_tools.py,sha256=RyZUlTefSQozfl-8feZGauyUkwcFd-jU0KtKHFxHea4,2272
3
3
  fmtr/tools/async_tools.py,sha256=ewz757WcveQJd-G5SVr2JDOQVbdLGecCgl-tsBGVZz4,284
4
4
  fmtr/tools/augmentation_tools.py,sha256=-6ESbO4CDlKqVOV1J1V6qBeoBMzbFIinkDHRHnCBej0,55
5
5
  fmtr/tools/caching_tools.py,sha256=74p7m2GLFfeP41LX69wxgfkilxEAoWkMIfFMjKsYpyg,4976
@@ -44,12 +44,12 @@ fmtr/tools/tabular_tools.py,sha256=tpIpZzYku1HcJrHZJL6BC39LmN3WUWVhFbK2N7nDVmE,1
44
44
  fmtr/tools/tokenization_tools.py,sha256=me-IBzSLyNYejLybwjO9CNB6Mj2NYfKPaOVThXyaGNg,4268
45
45
  fmtr/tools/tools.py,sha256=CAsApa1YwVdNE6H66Vjivs_mXYvOas3rh7fPELAnTpk,795
46
46
  fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
47
- fmtr/tools/version,sha256=9gUW_B3XD6hqBCvKuP1gvJ88VvVyeh3gSrb8ecLqXBg,6
47
+ fmtr/tools/version,sha256=1S8waPxV74wCdn2itKFyhvvnbb7aVuX28-VkRL33YZg,6
48
48
  fmtr/tools/yaml_tools.py,sha256=Bhhyd6GQVKO72Lp8ky7bAUjIB_65Hdh0Q45SKIEe6S8,1901
49
49
  fmtr/tools/ai_tools/__init__.py,sha256=JZrLuOFNV1A3wvJgonxOgz_4WS-7MfCuowGWA5uYCjs,372
50
50
  fmtr/tools/ai_tools/agentic_tools.py,sha256=acSEPFS-aguDXanWGs3fAAlRyJSYPZW7L-Kb2qDLm-I,4300
51
51
  fmtr/tools/ai_tools/inference_tools.py,sha256=2UP2gXEyOJUjyyV6zmFIYmIxUsh1rXkRH0IbFvr2bRs,11908
52
- fmtr/tools/dns_tools/__init__.py,sha256=PjD3Og6D5yvDVpKmsUsrnSpz_rjXpl4zBtvMqm8xKWU,237
52
+ fmtr/tools/dns_tools/__init__.py,sha256=Mzaepy8lEdT0SJtUOCnF3IkpOt0vrZn-IOgOf4xfd8Q,258
53
53
  fmtr/tools/dns_tools/client.py,sha256=IBbd7Xgx9ExTn_EPoL7ts9JfXokHHuOiD9m4K6tl1Q0,2817
54
54
  fmtr/tools/dns_tools/dm.py,sha256=Lp1HaF7rpVtL_Ji4Bd32B29105H9ZKQ8AcVj_AB7nsA,6678
55
55
  fmtr/tools/dns_tools/proxy.py,sha256=gCWfH1pyWjj8xnJ8Pm4id7bsBWqcar3dQ9PeP5XjRXY,1624
@@ -76,9 +76,9 @@ fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g
76
76
  fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
77
77
  fmtr/tools/version_tools/__init__.py,sha256=pg4iLtmIr5HtyEW_j0fMFoIdzqi_w9xH8-grQaXLB28,318
78
78
  fmtr/tools/version_tools/version_tools.py,sha256=Hcc6yferZS1hHbugRTdiHhSNmXEEG0hjCiTTXKna-YY,1127
79
- fmtr_tools-1.3.20.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
80
- fmtr_tools-1.3.20.dist-info/METADATA,sha256=fe1iHpsE_wFrWq8mA2u_Q0Kt_HJUm5Rplq4aqqVWtqE,15938
81
- fmtr_tools-1.3.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
- fmtr_tools-1.3.20.dist-info/entry_points.txt,sha256=h-r__Xh5njtFqreMLg6cGuTFS4Qh-QqJPU1HB-_BS-Q,357
83
- fmtr_tools-1.3.20.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
84
- fmtr_tools-1.3.20.dist-info/RECORD,,
79
+ fmtr_tools-1.3.22.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
80
+ fmtr_tools-1.3.22.dist-info/METADATA,sha256=yUEzCAR0OIWjGPaYvZVbZiGY52sHLyz2rPXQgMVlWxM,15938
81
+ fmtr_tools-1.3.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
+ fmtr_tools-1.3.22.dist-info/entry_points.txt,sha256=h-r__Xh5njtFqreMLg6cGuTFS4Qh-QqJPU1HB-_BS-Q,357
83
+ fmtr_tools-1.3.22.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
84
+ fmtr_tools-1.3.22.dist-info/RECORD,,