fmtr.tools 1.3.44__py3-none-any.whl → 1.3.45__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.

@@ -2,7 +2,7 @@ import flet as ft
2
2
  from flet.core.types import AppView
3
3
  from flet.core.view import View
4
4
  from functools import cached_property
5
- from typing import TypeVar, Generic, Type
5
+ from typing import TypeVar, Generic, Type, Self
6
6
 
7
7
  from fmtr.tools import environment_tools
8
8
  from fmtr.tools.constants import Constants
@@ -86,7 +86,7 @@ class Interface(Generic[T], ft.Column):
86
86
  super().__init__(*args, **kwargs, scroll=self.SCROLL)
87
87
 
88
88
  @classmethod
89
- def render(cls, page: ft.Page):
89
+ async def render(cls, page: ft.Page):
90
90
  """
91
91
 
92
92
  Interface entry point. Set relevant callbacks, and add instantiated self to page views
@@ -97,7 +97,9 @@ class Interface(Generic[T], ft.Column):
97
97
  page.theme = cls.get_theme()
98
98
  page.views.clear()
99
99
  context = cls.TypeContext(page=page)
100
- self = cls(context)
100
+
101
+ self = await cls.create(context)
102
+
101
103
  view = self.view
102
104
  if not view:
103
105
  view = self
@@ -107,6 +109,17 @@ class Interface(Generic[T], ft.Column):
107
109
 
108
110
  page.go(cls.ROUTE_ROOT)
109
111
 
112
+ @classmethod
113
+ async def create(cls, context: T) -> Self:
114
+ """
115
+
116
+ Overridable async interface constructor.
117
+
118
+ """
119
+ self = cls(context)
120
+ return self
121
+
122
+
110
123
  @cached_property
111
124
  def view(self):
112
125
  """
fmtr/tools/version CHANGED
@@ -1 +1 @@
1
- 1.3.44
1
+ 1.3.45
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmtr.tools
3
- Version: 1.3.44
3
+ Version: 1.3.45
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
@@ -136,64 +136,64 @@ Provides-Extra: db-document
136
136
  Requires-Dist: beanie[odm]; extra == "db-document"
137
137
  Requires-Dist: motor; extra == "db-document"
138
138
  Provides-Extra: all
139
- Requires-Dist: pydantic; extra == "all"
140
- Requires-Dist: cachetools; extra == "all"
139
+ Requires-Dist: distributed; extra == "all"
140
+ Requires-Dist: openpyxl; extra == "all"
141
141
  Requires-Dist: filetype; extra == "all"
142
- Requires-Dist: dask[bag]; extra == "all"
143
- Requires-Dist: httpx; extra == "all"
144
- Requires-Dist: peft; extra == "all"
145
142
  Requires-Dist: deepmerge; extra == "all"
146
- Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
147
- Requires-Dist: torchaudio; extra == "all"
148
- Requires-Dist: google-auth-oauthlib; extra == "all"
149
- Requires-Dist: logfire[httpx]; extra == "all"
150
- Requires-Dist: google-auth-httplib2; extra == "all"
151
- Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
152
- Requires-Dist: transformers[sentencepiece]; extra == "all"
153
- Requires-Dist: dnspython[doh]; extra == "all"
154
- Requires-Dist: flet-webview; extra == "all"
155
- Requires-Dist: uvicorn[standard]; extra == "all"
156
- Requires-Dist: pytest-cov; extra == "all"
157
- Requires-Dist: httpx_retries; extra == "all"
143
+ Requires-Dist: logfire; extra == "all"
144
+ Requires-Dist: bokeh; extra == "all"
158
145
  Requires-Dist: flet[all]; extra == "all"
159
- Requires-Dist: Unidecode; extra == "all"
160
- Requires-Dist: openpyxl; extra == "all"
146
+ Requires-Dist: diskcache; extra == "all"
147
+ Requires-Dist: pydantic; extra == "all"
161
148
  Requires-Dist: ollama; extra == "all"
162
- Requires-Dist: json_repair; extra == "all"
163
- Requires-Dist: appdirs; extra == "all"
164
- Requires-Dist: distributed; extra == "all"
165
- Requires-Dist: contexttimer; extra == "all"
149
+ Requires-Dist: motor; extra == "all"
150
+ Requires-Dist: docker; extra == "all"
166
151
  Requires-Dist: regex; extra == "all"
152
+ Requires-Dist: dask[bag]; extra == "all"
153
+ Requires-Dist: google-auth; extra == "all"
154
+ Requires-Dist: pyyaml; extra == "all"
167
155
  Requires-Dist: faker; extra == "all"
168
- Requires-Dist: diskcache; extra == "all"
169
- Requires-Dist: bokeh; extra == "all"
156
+ Requires-Dist: logfire[httpx]; extra == "all"
170
157
  Requires-Dist: setuptools; extra == "all"
171
- Requires-Dist: semver; extra == "all"
172
- Requires-Dist: tokenizers; extra == "all"
173
- Requires-Dist: pydantic-settings; extra == "all"
174
- Requires-Dist: motor; extra == "all"
175
- Requires-Dist: logfire[fastapi]; extra == "all"
176
- Requires-Dist: tabulate; extra == "all"
177
- Requires-Dist: sre_yield; extra == "all"
178
- Requires-Dist: beanie[odm]; extra == "all"
179
- Requires-Dist: html2text; extra == "all"
180
158
  Requires-Dist: tinynetrc; extra == "all"
159
+ Requires-Dist: google-api-python-client; extra == "all"
160
+ Requires-Dist: uvicorn[standard]; extra == "all"
161
+ Requires-Dist: flet-video; extra == "all"
162
+ Requires-Dist: pymupdf4llm; extra == "all"
163
+ Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
164
+ Requires-Dist: appdirs; extra == "all"
165
+ Requires-Dist: Unidecode; extra == "all"
181
166
  Requires-Dist: huggingface_hub; extra == "all"
182
- Requires-Dist: fastapi; extra == "all"
183
- Requires-Dist: google-auth; extra == "all"
184
- Requires-Dist: playwright; extra == "all"
185
- Requires-Dist: openai; extra == "all"
186
- Requires-Dist: sentence_transformers; extra == "all"
167
+ Requires-Dist: html2text; extra == "all"
187
168
  Requires-Dist: yamlscript; extra == "all"
169
+ Requires-Dist: google-auth-oauthlib; extra == "all"
170
+ Requires-Dist: openai; extra == "all"
171
+ Requires-Dist: logfire[fastapi]; extra == "all"
172
+ Requires-Dist: beanie[odm]; extra == "all"
173
+ Requires-Dist: cachetools; extra == "all"
174
+ Requires-Dist: torchaudio; extra == "all"
175
+ Requires-Dist: transformers[sentencepiece]; extra == "all"
188
176
  Requires-Dist: torchvision; extra == "all"
177
+ Requires-Dist: httpx; extra == "all"
178
+ Requires-Dist: semver; extra == "all"
189
179
  Requires-Dist: pandas; extra == "all"
190
- Requires-Dist: pymupdf4llm; extra == "all"
191
- Requires-Dist: logfire; extra == "all"
192
- Requires-Dist: google-api-python-client; extra == "all"
193
- Requires-Dist: flet-video; extra == "all"
194
- Requires-Dist: pyyaml; extra == "all"
195
- Requires-Dist: docker; extra == "all"
180
+ Requires-Dist: google-auth-httplib2; extra == "all"
181
+ Requires-Dist: json_repair; extra == "all"
182
+ Requires-Dist: tokenizers; extra == "all"
183
+ Requires-Dist: httpx_retries; extra == "all"
184
+ Requires-Dist: contexttimer; extra == "all"
185
+ Requires-Dist: fastapi; extra == "all"
196
186
  Requires-Dist: pymupdf; extra == "all"
187
+ Requires-Dist: playwright; extra == "all"
188
+ Requires-Dist: pytest-cov; extra == "all"
189
+ Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
190
+ Requires-Dist: sentence_transformers; extra == "all"
191
+ Requires-Dist: pydantic-settings; extra == "all"
192
+ Requires-Dist: peft; extra == "all"
193
+ Requires-Dist: tabulate; extra == "all"
194
+ Requires-Dist: sre_yield; extra == "all"
195
+ Requires-Dist: flet-webview; extra == "all"
196
+ Requires-Dist: dnspython[doh]; extra == "all"
197
197
  Dynamic: author
198
198
  Dynamic: author-email
199
199
  Dynamic: description
@@ -46,7 +46,7 @@ fmtr/tools/tabular_tools.py,sha256=tpIpZzYku1HcJrHZJL6BC39LmN3WUWVhFbK2N7nDVmE,1
46
46
  fmtr/tools/tokenization_tools.py,sha256=me-IBzSLyNYejLybwjO9CNB6Mj2NYfKPaOVThXyaGNg,4268
47
47
  fmtr/tools/tools.py,sha256=CAsApa1YwVdNE6H66Vjivs_mXYvOas3rh7fPELAnTpk,795
48
48
  fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
49
- fmtr/tools/version,sha256=uaOSf8iXcHUWYaRBswiwreX6CIytCFIYgFC7iunaEbE,6
49
+ fmtr/tools/version,sha256=Ql4M6Jm9b8Ebo24LKhh-qWkWym8akse7UEH13YS0gTs,6
50
50
  fmtr/tools/webhook_tools.py,sha256=q3pVJ1NCem2SrMuFcLxiWd7DibFs7Q-uGtojfXd3Qcg,380
51
51
  fmtr/tools/yaml_tools.py,sha256=Bhhyd6GQVKO72Lp8ky7bAUjIB_65Hdh0Q45SKIEe6S8,1901
52
52
  fmtr/tools/ai_tools/__init__.py,sha256=O8VRlPnnQCncg2ZZ2l_VdWLJf4jkKH6dkZFVbv6o7IM,388
@@ -68,7 +68,7 @@ fmtr/tools/entrypoints/shell_debug.py,sha256=0No3tAg9Ri4_vvSlQCUtAY-11HR0nE45i0V
68
68
  fmtr/tools/interface_tools/__init__.py,sha256=qTN0Hd4A65aWQ4wza48xTNiI2aXBZVEyObdQIsMR2Uk,398
69
69
  fmtr/tools/interface_tools/context.py,sha256=VpoR_ZCndDbwS0AzIPKi1hB2QckwJU5dJqAJavF3mqk,151
70
70
  fmtr/tools/interface_tools/controls.py,sha256=oOl0_sZB8fkvYB-9A5yjArfQmFQLMCsVGgRNrJAFJm4,332
71
- fmtr/tools/interface_tools/interface_tools.py,sha256=6cNHBIYNGtLAK16pk3KMrl_ru39OZ_emH7yXtSkvgFE,3998
71
+ fmtr/tools/interface_tools/interface_tools.py,sha256=i1TqP_67pVGiRZotKdVxyH0b5OFwaTZ_5Tf60gip0ts,4214
72
72
  fmtr/tools/path_tools/__init__.py,sha256=XrJXt7Zzo90tYUVksMlDfKkWt775zJ9OSi2NbhnqMDI,459
73
73
  fmtr/tools/path_tools/app_path_tools.py,sha256=JrJvtTDd_gkCKcZtBCDTMktsM77PZwGV_hzQX0g5GU8,1722
74
74
  fmtr/tools/path_tools/path_tools.py,sha256=eh30PpmH0wopy0wNWuPT84cmXY1EvqsTSDT7AV_GPOY,8034
@@ -85,9 +85,9 @@ fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g
85
85
  fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
86
86
  fmtr/tools/version_tools/__init__.py,sha256=cjE6nO6AoVOUp3RwgTbqL9wiw8J1l2pHJOz6Gn6bxjA,326
87
87
  fmtr/tools/version_tools/version_tools.py,sha256=Hcc6yferZS1hHbugRTdiHhSNmXEEG0hjCiTTXKna-YY,1127
88
- fmtr_tools-1.3.44.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
89
- fmtr_tools-1.3.44.dist-info/METADATA,sha256=fYZrC9EV5c-Hlmj7ARiTVuo9UuwNwS2FO1VGnwuMqzM,16436
90
- fmtr_tools-1.3.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
91
- fmtr_tools-1.3.44.dist-info/entry_points.txt,sha256=h-r__Xh5njtFqreMLg6cGuTFS4Qh-QqJPU1HB-_BS-Q,357
92
- fmtr_tools-1.3.44.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
93
- fmtr_tools-1.3.44.dist-info/RECORD,,
88
+ fmtr_tools-1.3.45.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
89
+ fmtr_tools-1.3.45.dist-info/METADATA,sha256=ZB994EXHJJV5xel-DEPuTLO1ajFLXpLfQ5GmOcIQpT4,16436
90
+ fmtr_tools-1.3.45.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
91
+ fmtr_tools-1.3.45.dist-info/entry_points.txt,sha256=h-r__Xh5njtFqreMLg6cGuTFS4Qh-QqJPU1HB-_BS-Q,357
92
+ fmtr_tools-1.3.45.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
93
+ fmtr_tools-1.3.45.dist-info/RECORD,,