fmtr.tools 1.3.21__tar.gz → 1.3.23__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.21 → fmtr_tools-1.3.23}/PKG-INFO +43 -43
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/api_tools.py +5 -3
- fmtr_tools-1.3.23/fmtr/tools/interface_tools.py +89 -0
- fmtr_tools-1.3.23/fmtr/tools/version +1 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr.tools.egg-info/PKG-INFO +43 -43
- fmtr_tools-1.3.21/fmtr/tools/interface_tools.py +0 -64
- fmtr_tools-1.3.21/fmtr/tools/version +0 -1
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/LICENSE +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/README.md +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/ai_tools/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/ai_tools/agentic_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/ai_tools/inference_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/async_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/augmentation_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/caching_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/constants.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/data_modelling_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/dataclass_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/datatype_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/debugging_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/dns_tools/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/dns_tools/client.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/dns_tools/dm.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/dns_tools/proxy.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/dns_tools/server.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/docker_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/entrypoints/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/entrypoints/cache_hfh.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/entrypoints/ep_test.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/entrypoints/install_yamlscript.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/entrypoints/remote_debug_test.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/entrypoints/shell_debug.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/environment_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/function_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/google_api_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/hash_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/hfh_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/html_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/http_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/import_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/inspection_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/iterator_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/json_fix_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/json_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/logging_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/merging_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/metric_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/name_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/netrc_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/openai_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/packaging_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/parallel_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/path_tools/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/path_tools/app_path_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/path_tools/path_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/path_tools/type_path_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/pattern_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/pdf_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/platform_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/process_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/profiling_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/random_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/semantic_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/settings_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/setup_tools/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/setup_tools/setup_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/spaces_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/string_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tabular_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/conftest.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/helpers.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/test_datatype.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/test_environment.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/test_json.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/test_path.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tests/test_yaml.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tokenization_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/unicode_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/version_tools/__init__.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/version_tools/version_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr/tools/yaml_tools.py +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr.tools.egg-info/SOURCES.txt +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr.tools.egg-info/dependency_links.txt +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr.tools.egg-info/entry_points.txt +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr.tools.egg-info/requires.txt +42 -42
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/fmtr.tools.egg-info/top_level.txt +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/pyproject.toml +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/setup.cfg +0 -0
- {fmtr_tools-1.3.21 → fmtr_tools-1.3.23}/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.23
|
|
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: bokeh; extra == "all"
|
|
130
|
-
Requires-Dist: faker; extra == "all"
|
|
131
|
-
Requires-Dist: logfire; extra == "all"
|
|
132
|
-
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
133
|
-
Requires-Dist: regex; extra == "all"
|
|
134
|
-
Requires-Dist: dask[bag]; extra == "all"
|
|
135
|
-
Requires-Dist: peft; extra == "all"
|
|
136
|
-
Requires-Dist: sentence_transformers; extra == "all"
|
|
137
|
-
Requires-Dist: setuptools; extra == "all"
|
|
138
129
|
Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
|
|
139
|
-
Requires-Dist:
|
|
140
|
-
Requires-Dist: pydantic-settings; extra == "all"
|
|
130
|
+
Requires-Dist: semver; extra == "all"
|
|
141
131
|
Requires-Dist: deepmerge; extra == "all"
|
|
142
|
-
Requires-Dist:
|
|
132
|
+
Requires-Dist: distributed; extra == "all"
|
|
143
133
|
Requires-Dist: flet-webview; extra == "all"
|
|
144
|
-
Requires-Dist:
|
|
145
|
-
Requires-Dist:
|
|
146
|
-
Requires-Dist:
|
|
147
|
-
Requires-Dist:
|
|
148
|
-
Requires-Dist:
|
|
149
|
-
Requires-Dist:
|
|
150
|
-
Requires-Dist:
|
|
134
|
+
Requires-Dist: cachetools; extra == "all"
|
|
135
|
+
Requires-Dist: tabulate; extra == "all"
|
|
136
|
+
Requires-Dist: diskcache; extra == "all"
|
|
137
|
+
Requires-Dist: tinynetrc; extra == "all"
|
|
138
|
+
Requires-Dist: pymupdf; extra == "all"
|
|
139
|
+
Requires-Dist: flet[all]; extra == "all"
|
|
140
|
+
Requires-Dist: html2text; extra == "all"
|
|
141
|
+
Requires-Dist: logfire[httpx]; extra == "all"
|
|
151
142
|
Requires-Dist: tokenizers; extra == "all"
|
|
152
|
-
Requires-Dist:
|
|
143
|
+
Requires-Dist: openai; extra == "all"
|
|
144
|
+
Requires-Dist: transformers[sentencepiece]; extra == "all"
|
|
153
145
|
Requires-Dist: pymupdf4llm; extra == "all"
|
|
154
|
-
Requires-Dist:
|
|
146
|
+
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
155
147
|
Requires-Dist: torchaudio; extra == "all"
|
|
156
|
-
Requires-Dist:
|
|
157
|
-
Requires-Dist:
|
|
158
|
-
Requires-Dist:
|
|
159
|
-
Requires-Dist:
|
|
160
|
-
Requires-Dist:
|
|
161
|
-
Requires-Dist: semver; extra == "all"
|
|
162
|
-
Requires-Dist: filetype; extra == "all"
|
|
163
|
-
Requires-Dist: distributed; extra == "all"
|
|
148
|
+
Requires-Dist: logfire; extra == "all"
|
|
149
|
+
Requires-Dist: docker; extra == "all"
|
|
150
|
+
Requires-Dist: regex; extra == "all"
|
|
151
|
+
Requires-Dist: huggingface_hub; extra == "all"
|
|
152
|
+
Requires-Dist: pytest-cov; extra == "all"
|
|
164
153
|
Requires-Dist: fastapi; extra == "all"
|
|
165
|
-
Requires-Dist: ollama; extra == "all"
|
|
166
|
-
Requires-Dist: tinynetrc; extra == "all"
|
|
167
154
|
Requires-Dist: pandas; extra == "all"
|
|
168
|
-
Requires-Dist:
|
|
155
|
+
Requires-Dist: setuptools; extra == "all"
|
|
156
|
+
Requires-Dist: dask[bag]; extra == "all"
|
|
157
|
+
Requires-Dist: contexttimer; extra == "all"
|
|
158
|
+
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
159
|
+
Requires-Dist: faker; extra == "all"
|
|
160
|
+
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
169
161
|
Requires-Dist: openpyxl; extra == "all"
|
|
170
|
-
Requires-Dist:
|
|
171
|
-
Requires-Dist:
|
|
172
|
-
Requires-Dist:
|
|
173
|
-
Requires-Dist: tabulate; extra == "all"
|
|
174
|
-
Requires-Dist: logfire[httpx]; extra == "all"
|
|
175
|
-
Requires-Dist: Unidecode; extra == "all"
|
|
176
|
-
Requires-Dist: pymupdf; extra == "all"
|
|
162
|
+
Requires-Dist: filetype; extra == "all"
|
|
163
|
+
Requires-Dist: sre_yield; extra == "all"
|
|
164
|
+
Requires-Dist: yamlscript; extra == "all"
|
|
177
165
|
Requires-Dist: google-api-python-client; extra == "all"
|
|
166
|
+
Requires-Dist: json_repair; extra == "all"
|
|
167
|
+
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
168
|
+
Requires-Dist: dnspython[doh]; extra == "all"
|
|
178
169
|
Requires-Dist: appdirs; extra == "all"
|
|
179
|
-
Requires-Dist: flet-video; extra == "all"
|
|
180
|
-
Requires-Dist: pyyaml; extra == "all"
|
|
181
|
-
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
182
170
|
Requires-Dist: httpx; extra == "all"
|
|
171
|
+
Requires-Dist: sentence_transformers; extra == "all"
|
|
172
|
+
Requires-Dist: google-auth; extra == "all"
|
|
173
|
+
Requires-Dist: pydantic-settings; extra == "all"
|
|
174
|
+
Requires-Dist: bokeh; extra == "all"
|
|
175
|
+
Requires-Dist: ollama; extra == "all"
|
|
176
|
+
Requires-Dist: torchvision; extra == "all"
|
|
177
|
+
Requires-Dist: peft; extra == "all"
|
|
178
|
+
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
183
179
|
Requires-Dist: httpx_retries; extra == "all"
|
|
180
|
+
Requires-Dist: flet-video; extra == "all"
|
|
181
|
+
Requires-Dist: pydantic; extra == "all"
|
|
182
|
+
Requires-Dist: pyyaml; extra == "all"
|
|
183
|
+
Requires-Dist: Unidecode; extra == "all"
|
|
184
184
|
Dynamic: author
|
|
185
185
|
Dynamic: author-email
|
|
186
186
|
Dynamic: description
|
|
@@ -24,7 +24,7 @@ class Endpoint:
|
|
|
24
24
|
self.tags = enlist(self.tags)
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class
|
|
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
|
-
|
|
100
|
+
Base.launch()
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import flet as ft
|
|
2
|
+
from flet.core.types import AppView
|
|
3
|
+
from flet.core.view import View
|
|
4
|
+
|
|
5
|
+
from fmtr.tools.logging_tools import logger
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Interface(ft.Column):
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
Simple interface base class.
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
TITLE = 'Base Interface'
|
|
15
|
+
HOST = '0.0.0.0'
|
|
16
|
+
PORT = 8080
|
|
17
|
+
URL = None
|
|
18
|
+
APPVIEW = AppView.WEB_BROWSER
|
|
19
|
+
PATH_ASSETS = None
|
|
20
|
+
ROUTE_ROOT = '/'
|
|
21
|
+
|
|
22
|
+
THEME = ft.Theme(color_scheme=ft.ColorScheme(primary=ft.Colors.PINK))
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def render(cls, page: ft.Page):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
Interface entry point. Set relevant callbacks, and add instantiated self to page views
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
if not page.on_route_change:
|
|
32
|
+
page.theme = cls.THEME
|
|
33
|
+
page.views.clear()
|
|
34
|
+
page.views.append(cls())
|
|
35
|
+
|
|
36
|
+
page.on_route_change = cls.route
|
|
37
|
+
page.on_view_pop = cls.pop
|
|
38
|
+
|
|
39
|
+
page.go(cls.ROUTE_ROOT)
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def route(cls, event: ft.RouteChangeEvent):
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
Overridable router.
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
logger.debug(f'Route change: {event=}')
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def pop(cls, view: View, page: ft.Page):
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
Overridable view pop.
|
|
55
|
+
|
|
56
|
+
"""
|
|
57
|
+
logger.debug(f'View popped: {page.route=} {len(page.views)=} {view=}')
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def launch(cls):
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
Launch via render method
|
|
64
|
+
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
if cls.URL:
|
|
68
|
+
url = cls.URL
|
|
69
|
+
else:
|
|
70
|
+
url = f'http://{cls.HOST}:{cls.PORT}'
|
|
71
|
+
|
|
72
|
+
logger.info(f"Launching {cls.TITLE} at {url}")
|
|
73
|
+
ft.app(cls.render, view=cls.APPVIEW, host=cls.HOST, port=cls.PORT, assets_dir=cls.PATH_ASSETS)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class Test(ft.Column):
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
Simple test interface.
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
TITLE = 'Test Interface'
|
|
83
|
+
|
|
84
|
+
def __init__(self):
|
|
85
|
+
controls = [ft.Text(self.TITLE)]
|
|
86
|
+
super().__init__(controls=controls)
|
|
87
|
+
|
|
88
|
+
if __name__ == "__main__":
|
|
89
|
+
Interface.launch()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.3.23
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.23
|
|
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: bokeh; extra == "all"
|
|
130
|
-
Requires-Dist: faker; extra == "all"
|
|
131
|
-
Requires-Dist: logfire; extra == "all"
|
|
132
|
-
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
133
|
-
Requires-Dist: regex; extra == "all"
|
|
134
|
-
Requires-Dist: dask[bag]; extra == "all"
|
|
135
|
-
Requires-Dist: peft; extra == "all"
|
|
136
|
-
Requires-Dist: sentence_transformers; extra == "all"
|
|
137
|
-
Requires-Dist: setuptools; extra == "all"
|
|
138
129
|
Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
|
|
139
|
-
Requires-Dist:
|
|
140
|
-
Requires-Dist: pydantic-settings; extra == "all"
|
|
130
|
+
Requires-Dist: semver; extra == "all"
|
|
141
131
|
Requires-Dist: deepmerge; extra == "all"
|
|
142
|
-
Requires-Dist:
|
|
132
|
+
Requires-Dist: distributed; extra == "all"
|
|
143
133
|
Requires-Dist: flet-webview; extra == "all"
|
|
144
|
-
Requires-Dist:
|
|
145
|
-
Requires-Dist:
|
|
146
|
-
Requires-Dist:
|
|
147
|
-
Requires-Dist:
|
|
148
|
-
Requires-Dist:
|
|
149
|
-
Requires-Dist:
|
|
150
|
-
Requires-Dist:
|
|
134
|
+
Requires-Dist: cachetools; extra == "all"
|
|
135
|
+
Requires-Dist: tabulate; extra == "all"
|
|
136
|
+
Requires-Dist: diskcache; extra == "all"
|
|
137
|
+
Requires-Dist: tinynetrc; extra == "all"
|
|
138
|
+
Requires-Dist: pymupdf; extra == "all"
|
|
139
|
+
Requires-Dist: flet[all]; extra == "all"
|
|
140
|
+
Requires-Dist: html2text; extra == "all"
|
|
141
|
+
Requires-Dist: logfire[httpx]; extra == "all"
|
|
151
142
|
Requires-Dist: tokenizers; extra == "all"
|
|
152
|
-
Requires-Dist:
|
|
143
|
+
Requires-Dist: openai; extra == "all"
|
|
144
|
+
Requires-Dist: transformers[sentencepiece]; extra == "all"
|
|
153
145
|
Requires-Dist: pymupdf4llm; extra == "all"
|
|
154
|
-
Requires-Dist:
|
|
146
|
+
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
155
147
|
Requires-Dist: torchaudio; extra == "all"
|
|
156
|
-
Requires-Dist:
|
|
157
|
-
Requires-Dist:
|
|
158
|
-
Requires-Dist:
|
|
159
|
-
Requires-Dist:
|
|
160
|
-
Requires-Dist:
|
|
161
|
-
Requires-Dist: semver; extra == "all"
|
|
162
|
-
Requires-Dist: filetype; extra == "all"
|
|
163
|
-
Requires-Dist: distributed; extra == "all"
|
|
148
|
+
Requires-Dist: logfire; extra == "all"
|
|
149
|
+
Requires-Dist: docker; extra == "all"
|
|
150
|
+
Requires-Dist: regex; extra == "all"
|
|
151
|
+
Requires-Dist: huggingface_hub; extra == "all"
|
|
152
|
+
Requires-Dist: pytest-cov; extra == "all"
|
|
164
153
|
Requires-Dist: fastapi; extra == "all"
|
|
165
|
-
Requires-Dist: ollama; extra == "all"
|
|
166
|
-
Requires-Dist: tinynetrc; extra == "all"
|
|
167
154
|
Requires-Dist: pandas; extra == "all"
|
|
168
|
-
Requires-Dist:
|
|
155
|
+
Requires-Dist: setuptools; extra == "all"
|
|
156
|
+
Requires-Dist: dask[bag]; extra == "all"
|
|
157
|
+
Requires-Dist: contexttimer; extra == "all"
|
|
158
|
+
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
159
|
+
Requires-Dist: faker; extra == "all"
|
|
160
|
+
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
169
161
|
Requires-Dist: openpyxl; extra == "all"
|
|
170
|
-
Requires-Dist:
|
|
171
|
-
Requires-Dist:
|
|
172
|
-
Requires-Dist:
|
|
173
|
-
Requires-Dist: tabulate; extra == "all"
|
|
174
|
-
Requires-Dist: logfire[httpx]; extra == "all"
|
|
175
|
-
Requires-Dist: Unidecode; extra == "all"
|
|
176
|
-
Requires-Dist: pymupdf; extra == "all"
|
|
162
|
+
Requires-Dist: filetype; extra == "all"
|
|
163
|
+
Requires-Dist: sre_yield; extra == "all"
|
|
164
|
+
Requires-Dist: yamlscript; extra == "all"
|
|
177
165
|
Requires-Dist: google-api-python-client; extra == "all"
|
|
166
|
+
Requires-Dist: json_repair; extra == "all"
|
|
167
|
+
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
168
|
+
Requires-Dist: dnspython[doh]; extra == "all"
|
|
178
169
|
Requires-Dist: appdirs; extra == "all"
|
|
179
|
-
Requires-Dist: flet-video; extra == "all"
|
|
180
|
-
Requires-Dist: pyyaml; extra == "all"
|
|
181
|
-
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
182
170
|
Requires-Dist: httpx; extra == "all"
|
|
171
|
+
Requires-Dist: sentence_transformers; extra == "all"
|
|
172
|
+
Requires-Dist: google-auth; extra == "all"
|
|
173
|
+
Requires-Dist: pydantic-settings; extra == "all"
|
|
174
|
+
Requires-Dist: bokeh; extra == "all"
|
|
175
|
+
Requires-Dist: ollama; extra == "all"
|
|
176
|
+
Requires-Dist: torchvision; extra == "all"
|
|
177
|
+
Requires-Dist: peft; extra == "all"
|
|
178
|
+
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
183
179
|
Requires-Dist: httpx_retries; extra == "all"
|
|
180
|
+
Requires-Dist: flet-video; extra == "all"
|
|
181
|
+
Requires-Dist: pydantic; extra == "all"
|
|
182
|
+
Requires-Dist: pyyaml; extra == "all"
|
|
183
|
+
Requires-Dist: Unidecode; extra == "all"
|
|
184
184
|
Dynamic: author
|
|
185
185
|
Dynamic: author-email
|
|
186
186
|
Dynamic: description
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import flet as ft
|
|
2
|
-
from flet.core.event import Event
|
|
3
|
-
from flet.core.types import AppView
|
|
4
|
-
from flet.core.view import View
|
|
5
|
-
|
|
6
|
-
from fmtr.tools.logging_tools import logger
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Interface:
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
Simple interface base class.
|
|
13
|
-
|
|
14
|
-
"""
|
|
15
|
-
TITLE = 'Base Interface'
|
|
16
|
-
HOST = '0.0.0.0'
|
|
17
|
-
PORT = 8080
|
|
18
|
-
APPVIEW = AppView.WEB_BROWSER
|
|
19
|
-
PATH_ASSETS = None
|
|
20
|
-
ROUTE_ROOT = '/'
|
|
21
|
-
|
|
22
|
-
def render(self, page: ft.Page):
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
Interface entry point.
|
|
26
|
-
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
if not page.on_route_change:
|
|
30
|
-
page.on_route_change = lambda e, page=page: self.route(page, e)
|
|
31
|
-
page.on_view_pop = lambda view, page=page: self.pop(page, view)
|
|
32
|
-
|
|
33
|
-
page.go(self.ROUTE_ROOT)
|
|
34
|
-
|
|
35
|
-
def route(self, page: ft.Page, event: Event):
|
|
36
|
-
"""
|
|
37
|
-
|
|
38
|
-
Overridable router.
|
|
39
|
-
|
|
40
|
-
"""
|
|
41
|
-
raise NotImplementedError
|
|
42
|
-
|
|
43
|
-
def pop(self, page: ft.Page, view: View):
|
|
44
|
-
"""
|
|
45
|
-
|
|
46
|
-
Overridable view pop.
|
|
47
|
-
|
|
48
|
-
"""
|
|
49
|
-
raise NotImplementedError
|
|
50
|
-
|
|
51
|
-
@classmethod
|
|
52
|
-
def launch(cls):
|
|
53
|
-
"""
|
|
54
|
-
|
|
55
|
-
Initialise self and launch.
|
|
56
|
-
|
|
57
|
-
"""
|
|
58
|
-
self = cls()
|
|
59
|
-
logger.info(f"Launching {self.TITLE} at http://{self.HOST}:{self.PORT}")
|
|
60
|
-
ft.app(self.render, view=self.APPVIEW, host=self.HOST, port=self.PORT, assets_dir=self.PATH_ASSETS)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if __name__ == "__main__":
|
|
64
|
-
Interface.launch()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.3.21
|
|
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
|
-
bokeh
|
|
18
|
-
faker
|
|
19
|
-
logfire
|
|
20
|
-
uvicorn[standard]
|
|
21
|
-
regex
|
|
22
|
-
dask[bag]
|
|
23
|
-
peft
|
|
24
|
-
sentence_transformers
|
|
25
|
-
setuptools
|
|
26
17
|
pydantic-ai[logfire,openai]
|
|
27
|
-
|
|
28
|
-
pydantic-settings
|
|
18
|
+
semver
|
|
29
19
|
deepmerge
|
|
30
|
-
|
|
20
|
+
distributed
|
|
31
21
|
flet-webview
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
cachetools
|
|
23
|
+
tabulate
|
|
24
|
+
diskcache
|
|
25
|
+
tinynetrc
|
|
26
|
+
pymupdf
|
|
27
|
+
flet[all]
|
|
28
|
+
html2text
|
|
29
|
+
logfire[httpx]
|
|
39
30
|
tokenizers
|
|
40
|
-
|
|
31
|
+
openai
|
|
32
|
+
transformers[sentencepiece]
|
|
41
33
|
pymupdf4llm
|
|
42
|
-
|
|
34
|
+
pydevd-pycharm~=251.25410.159
|
|
43
35
|
torchaudio
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
semver
|
|
50
|
-
filetype
|
|
51
|
-
distributed
|
|
36
|
+
logfire
|
|
37
|
+
docker
|
|
38
|
+
regex
|
|
39
|
+
huggingface_hub
|
|
40
|
+
pytest-cov
|
|
52
41
|
fastapi
|
|
53
|
-
ollama
|
|
54
|
-
tinynetrc
|
|
55
42
|
pandas
|
|
56
|
-
|
|
43
|
+
setuptools
|
|
44
|
+
dask[bag]
|
|
45
|
+
contexttimer
|
|
46
|
+
google-auth-httplib2
|
|
47
|
+
faker
|
|
48
|
+
google-auth-oauthlib
|
|
57
49
|
openpyxl
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
tabulate
|
|
62
|
-
logfire[httpx]
|
|
63
|
-
Unidecode
|
|
64
|
-
pymupdf
|
|
50
|
+
filetype
|
|
51
|
+
sre_yield
|
|
52
|
+
yamlscript
|
|
65
53
|
google-api-python-client
|
|
54
|
+
json_repair
|
|
55
|
+
logfire[fastapi]
|
|
56
|
+
dnspython[doh]
|
|
66
57
|
appdirs
|
|
67
|
-
flet-video
|
|
68
|
-
pyyaml
|
|
69
|
-
google-auth-httplib2
|
|
70
58
|
httpx
|
|
59
|
+
sentence_transformers
|
|
60
|
+
google-auth
|
|
61
|
+
pydantic-settings
|
|
62
|
+
bokeh
|
|
63
|
+
ollama
|
|
64
|
+
torchvision
|
|
65
|
+
peft
|
|
66
|
+
uvicorn[standard]
|
|
71
67
|
httpx_retries
|
|
68
|
+
flet-video
|
|
69
|
+
pydantic
|
|
70
|
+
pyyaml
|
|
71
|
+
Unidecode
|
|
72
72
|
|
|
73
73
|
[api]
|
|
74
74
|
fastapi
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|