fmtr.tools 1.3.21__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()
fmtr/tools/version CHANGED
@@ -1 +1 @@
1
- 1.3.21
1
+ 1.3.22
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmtr.tools
3
- Version: 1.3.21
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: uvicorn[standard]; extra == "all"
130
- Requires-Dist: logfire; extra == "all"
131
- Requires-Dist: tokenizers; extra == "all"
132
- Requires-Dist: pandas; extra == "all"
129
+ Requires-Dist: contexttimer; extra == "all"
133
130
  Requires-Dist: httpx; extra == "all"
134
- Requires-Dist: setuptools; extra == "all"
135
- Requires-Dist: Unidecode; extra == "all"
136
- Requires-Dist: html2text; extra == "all"
137
- Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
138
- Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
139
- Requires-Dist: httpx_retries; extra == "all"
140
- Requires-Dist: filetype; extra == "all"
141
- Requires-Dist: dask[bag]; extra == "all"
142
- Requires-Dist: pydantic; extra == "all"
143
- Requires-Dist: pymupdf4llm; extra == "all"
144
- Requires-Dist: docker; extra == "all"
131
+ Requires-Dist: huggingface_hub; extra == "all"
132
+ Requires-Dist: tinynetrc; extra == "all"
133
+ Requires-Dist: json_repair; extra == "all"
145
134
  Requires-Dist: google-auth-httplib2; extra == "all"
146
- Requires-Dist: flet-webview; extra == "all"
147
- Requires-Dist: openpyxl; extra == "all"
148
- Requires-Dist: openai; extra == "all"
149
- Requires-Dist: logfire[fastapi]; extra == "all"
150
- Requires-Dist: bokeh; extra == "all"
151
- Requires-Dist: google-api-python-client; extra == "all"
152
- Requires-Dist: pyyaml; extra == "all"
135
+ Requires-Dist: distributed; extra == "all"
153
136
  Requires-Dist: yamlscript; extra == "all"
154
- Requires-Dist: google-auth-oauthlib; extra == "all"
155
- Requires-Dist: json_repair; extra == "all"
156
- Requires-Dist: sentence_transformers; extra == "all"
157
- Requires-Dist: peft; extra == "all"
158
- Requires-Dist: diskcache; extra == "all"
159
- Requires-Dist: cachetools; extra == "all"
137
+ Requires-Dist: flet-video; extra == "all"
138
+ Requires-Dist: pandas; extra == "all"
139
+ Requires-Dist: filetype; extra == "all"
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"
144
+ Requires-Dist: logfire[fastapi]; extra == "all"
145
+ Requires-Dist: pydantic-settings; extra == "all"
146
+ Requires-Dist: torchvision; extra == "all"
147
+ Requires-Dist: openai; extra == "all"
160
148
  Requires-Dist: sre_yield; extra == "all"
161
- Requires-Dist: faker; extra == "all"
162
- Requires-Dist: tabulate; extra == "all"
149
+ Requires-Dist: logfire[httpx]; extra == "all"
150
+ Requires-Dist: pymupdf4llm; extra == "all"
163
151
  Requires-Dist: pymupdf; extra == "all"
152
+ Requires-Dist: faker; extra == "all"
153
+ Requires-Dist: uvicorn[standard]; extra == "all"
164
154
  Requires-Dist: pytest-cov; extra == "all"
165
155
  Requires-Dist: google-auth; extra == "all"
166
156
  Requires-Dist: appdirs; extra == "all"
167
- Requires-Dist: pydantic-settings; extra == "all"
168
- Requires-Dist: regex; extra == "all"
169
- Requires-Dist: torchvision; extra == "all"
170
- Requires-Dist: distributed; extra == "all"
171
- Requires-Dist: torchaudio; 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"
165
+ Requires-Dist: httpx_retries; 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"
170
+ Requires-Dist: peft; extra == "all"
171
+ Requires-Dist: semver; extra == "all"
172
172
  Requires-Dist: deepmerge; extra == "all"
173
173
  Requires-Dist: fastapi; extra == "all"
174
174
  Requires-Dist: flet[all]; extra == "all"
175
- Requires-Dist: huggingface_hub; extra == "all"
176
- Requires-Dist: dnspython[doh]; 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"
177
182
  Requires-Dist: ollama; extra == "all"
178
- Requires-Dist: contexttimer; extra == "all"
179
- Requires-Dist: semver; extra == "all"
180
- Requires-Dist: flet-video; extra == "all"
181
- Requires-Dist: logfire[httpx]; extra == "all"
182
- Requires-Dist: tinynetrc; extra == "all"
183
- Requires-Dist: transformers[sentencepiece]; 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,7 +44,7 @@ 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=cvhadKKPw11qd560krb_gX5ym6Wvv3xEb6FFkldcumQ,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
@@ -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.21.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
80
- fmtr_tools-1.3.21.dist-info/METADATA,sha256=maUC1a0Pjda8V8J5YTJhkSKa-YQLW_QU4cfaSUCOHMo,15938
81
- fmtr_tools-1.3.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
- fmtr_tools-1.3.21.dist-info/entry_points.txt,sha256=h-r__Xh5njtFqreMLg6cGuTFS4Qh-QqJPU1HB-_BS-Q,357
83
- fmtr_tools-1.3.21.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
84
- fmtr_tools-1.3.21.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,,