fmtr.tools 1.1.0__py3-none-any.whl → 1.1.2__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/__init__.py CHANGED
@@ -162,35 +162,4 @@ except ImportError as exception:
162
162
  try:
163
163
  from fmtr.tools import settings_tools as sets
164
164
  except ImportError as exception:
165
- sets = MissingExtraMockModule('sets', exception)
166
-
167
-
168
- __all__ = [
169
- 'dataclass',
170
- 'datatype',
171
- 'environment',
172
- 'env',
173
- 'function',
174
- 'hash',
175
- 'import_',
176
- 'iterator',
177
- 'json',
178
- 'path',
179
- 'Path',
180
- 'platform',
181
- 'process',
182
- 'ContextProcess',
183
- 'random',
184
- 'string',
185
- 'logging',
186
- 'logger',
187
- 'augmentation',
188
- 'docker',
189
- 'Container',
190
- 'parallel',
191
- 'profiling',
192
- 'Timer',
193
- 'tokenization',
194
- 'unicode',
195
- 'version'
196
- ]
165
+ sets = MissingExtraMockModule('sets', exception)
@@ -24,6 +24,7 @@ class Task:
24
24
  PROVIDER_FMTR = OpenAIProvider(base_url=API_URL_FMTR)
25
25
 
26
26
  MODEL_ID = 'gpt-4o'
27
+ MODEL_ID_FMTR = 'qwen2.5-coder:14b'
27
28
  SYSTEM_PROMPT = None
28
29
  DEPS_TYPE = str
29
30
  RESULT_TYPE = str
@@ -86,14 +87,19 @@ class Task:
86
87
  """
87
88
  return output
88
89
 
90
+ if __name__ == '__main__':
91
+ import asyncio
92
+ from fmtr.tools import dm
89
93
 
90
- class TaskTest(Task):
91
- PROVIDER = Task.PROVIDER_FMTR
92
- MODEL_ID = 'mixtral:8x7b'
93
94
 
95
+ class TestOutput(dm.BaseModel):
96
+ text: str
94
97
 
95
- if __name__ == '__main__':
96
- import asyncio
98
+
99
+ class TaskTest(Task):
100
+ PROVIDER = Task.PROVIDER_FMTR
101
+ MODEL_ID = 'qwen2.5-coder:14b'
102
+ RESULT_TYPE = TestOutput
97
103
 
98
104
  task = TaskTest()
99
105
  result = asyncio.run(task.run('Hello! What is your name?'))
fmtr/tools/constants.py CHANGED
@@ -27,3 +27,7 @@ class Constants:
27
27
 
28
28
  FMTR_AI_HOST_KEY = 'FMTR_URL_HOST'
29
29
  FMTR_AI_HOST_DEFAULT = 'ai.gex.fmtr.dev'
30
+
31
+ FILENAME_CONFIG = 'settings.yaml'
32
+ DIR_NAME_ARTIFACTS = 'artifacts'
33
+ FILENAME_VERSION = 'version'
fmtr/tools/path_tools.py CHANGED
@@ -153,11 +153,7 @@ class PackagePaths:
153
153
 
154
154
  """
155
155
 
156
- FILENAME_CONFIG = 'settings.yaml'
157
- DIR_NAME_ARTIFACTS = 'artifacts'
158
- FILENAME_VERSION = 'version'
159
-
160
- def __init__(self, path=None, org_singleton=None, dir_name_artifacts=DIR_NAME_ARTIFACTS, filename_config=FILENAME_CONFIG, file_version=FILENAME_VERSION):
156
+ def __init__(self, path=None, org_singleton=None, dir_name_artifacts=Constants.DIR_NAME_ARTIFACTS, filename_config=Constants.FILENAME_CONFIG, file_version=Constants.FILENAME_VERSION):
161
157
 
162
158
  """
163
159
 
fmtr/tools/version CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmtr.tools
3
- Version: 1.1.0
3
+ Version: 1.1.2
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
@@ -9,50 +9,50 @@ License: Copyright © 2025 Frontmatter. All rights reserved.
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
11
  Provides-Extra: test
12
- Requires-Dist: flet-webview; extra == "test"
13
- Requires-Dist: uvicorn; extra == "test"
14
- Requires-Dist: pymupdf4llm; extra == "test"
15
- Requires-Dist: pyyaml; extra == "test"
16
- Requires-Dist: pytest-cov; extra == "test"
17
- Requires-Dist: logfire; extra == "test"
18
- Requires-Dist: google-auth-httplib2; extra == "test"
12
+ Requires-Dist: flet[all]; extra == "test"
13
+ Requires-Dist: semver; extra == "test"
14
+ Requires-Dist: pandas; extra == "test"
15
+ Requires-Dist: pydantic-settings; extra == "test"
16
+ Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
19
17
  Requires-Dist: tinynetrc; extra == "test"
18
+ Requires-Dist: deepmerge; extra == "test"
19
+ Requires-Dist: pytest-cov; extra == "test"
20
+ Requires-Dist: torchaudio; extra == "test"
21
+ Requires-Dist: peft; extra == "test"
22
+ Requires-Dist: google-auth-oauthlib; extra == "test"
23
+ Requires-Dist: huggingface_hub; extra == "test"
24
+ Requires-Dist: uvicorn; extra == "test"
25
+ Requires-Dist: ollama; extra == "test"
20
26
  Requires-Dist: sre_yield; extra == "test"
21
- Requires-Dist: bokeh; extra == "test"
22
- Requires-Dist: html2text; extra == "test"
27
+ Requires-Dist: torchvision; extra == "test"
28
+ Requires-Dist: json_repair; extra == "test"
29
+ Requires-Dist: flet-video; extra == "test"
23
30
  Requires-Dist: sentence_transformers; extra == "test"
24
- Requires-Dist: docker; extra == "test"
25
- Requires-Dist: peft; extra == "test"
31
+ Requires-Dist: logfire; extra == "test"
26
32
  Requires-Dist: google-auth; extra == "test"
27
- Requires-Dist: fastapi; extra == "test"
28
33
  Requires-Dist: pydantic; extra == "test"
29
- Requires-Dist: pydantic-settings; extra == "test"
30
- Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
31
- Requires-Dist: torchvision; extra == "test"
32
- Requires-Dist: google-api-python-client; extra == "test"
34
+ Requires-Dist: diskcache; extra == "test"
35
+ Requires-Dist: fastapi; extra == "test"
36
+ Requires-Dist: pydevd-pycharm; extra == "test"
37
+ Requires-Dist: pyyaml; extra == "test"
38
+ Requires-Dist: openai; extra == "test"
39
+ Requires-Dist: pymupdf; extra == "test"
33
40
  Requires-Dist: distributed; extra == "test"
41
+ Requires-Dist: html2text; extra == "test"
42
+ Requires-Dist: faker; extra == "test"
43
+ Requires-Dist: tabulate; extra == "test"
44
+ Requires-Dist: docker; extra == "test"
34
45
  Requires-Dist: openpyxl; extra == "test"
35
- Requires-Dist: contexttimer; extra == "test"
36
- Requires-Dist: huggingface_hub; extra == "test"
37
46
  Requires-Dist: dask[bag]; extra == "test"
38
- Requires-Dist: tabulate; extra == "test"
39
- Requires-Dist: tokenizers; extra == "test"
40
- Requires-Dist: ollama; extra == "test"
41
- Requires-Dist: pandas; extra == "test"
42
- Requires-Dist: flet-video; extra == "test"
43
- Requires-Dist: flet[all]; extra == "test"
47
+ Requires-Dist: contexttimer; extra == "test"
48
+ Requires-Dist: pymupdf4llm; extra == "test"
44
49
  Requires-Dist: transformers[sentencepiece]; extra == "test"
45
- Requires-Dist: semver; extra == "test"
46
- Requires-Dist: openai; extra == "test"
47
- Requires-Dist: google-auth-oauthlib; extra == "test"
48
- Requires-Dist: pydevd-pycharm; extra == "test"
49
- Requires-Dist: faker; extra == "test"
50
- Requires-Dist: pymupdf; extra == "test"
51
- Requires-Dist: deepmerge; extra == "test"
52
- Requires-Dist: diskcache; extra == "test"
53
- Requires-Dist: json_repair; extra == "test"
50
+ Requires-Dist: tokenizers; extra == "test"
51
+ Requires-Dist: bokeh; extra == "test"
54
52
  Requires-Dist: Unidecode; extra == "test"
55
- Requires-Dist: torchaudio; extra == "test"
53
+ Requires-Dist: flet-webview; extra == "test"
54
+ Requires-Dist: google-auth-httplib2; extra == "test"
55
+ Requires-Dist: google-api-python-client; extra == "test"
56
56
  Provides-Extra: yaml
57
57
  Requires-Dist: pyyaml; extra == "yaml"
58
58
  Provides-Extra: logging
@@ -245,6 +245,7 @@ The included modules, plus any extra requirements, are as follows:
245
245
  - Extras: None
246
246
  -
247
247
  `tools.settings`: A base configuration system built on Pydantic Settings that provides a flexible way to manage application settings from multiple sources, based on a standard
248
+ - Extras: `sets`
248
249
  `path.PackagePaths` project layout.
249
250
  - Extras: `sets`
250
251
  - `tools.dataclass`: Utilities for extracting and filtering fields and metadata from dataclasses, with support for applying filters and retrieving enabled fields based on metadata attributes.
@@ -1,10 +1,10 @@
1
- fmtr/tools/__init__.py,sha256=plBJilu1BB5h3zAqbk572I7ko10jWc7eKZpHQwWjUtY,5627
1
+ fmtr/tools/__init__.py,sha256=_p8-qJSEfrdI5Kc1tTQ7RzIk7dbAcJ9yf0lpLEN4n80,5196
2
2
  fmtr/tools/api_tools.py,sha256=u5YEdKyKto8MKY8legULLU7xeJ7lY2Bgyaep_xa8iZg,2089
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=UOCYUNvLQ-NofR_dhqBmZF96-HRPf4At5MmxVk3gAIk,2943
6
6
  fmtr/tools/console_script_tools.py,sha256=Jcmm4WPhCQdPZfd468xD0epkt29sgcPROwKu79V_ehg,203
7
- fmtr/tools/constants.py,sha256=aKFFW9iYdUtiuLV0gS5XAZsLmk8DwvydYebc5yJN8NE,993
7
+ fmtr/tools/constants.py,sha256=KrV6JpITZuVdLDN5ZzQb1wAAA3nNust6exCvbZEaKQE,1102
8
8
  fmtr/tools/data_modelling_tools.py,sha256=0BFm-F_cYzVTxftWQwORkPd0FM2BTLVh9-s0-rTTFoo,1744
9
9
  fmtr/tools/dataclass_tools.py,sha256=0Gt6KeLhtPgubo_2tYkIVqB8oQ91Qzag8OAGZDdjvMU,1209
10
10
  fmtr/tools/datatype_tools.py,sha256=3P4AWIFGkJ-UqvXlj0Jc9IvkIIgTOE9jRrOk3NVbpH8,1508
@@ -29,7 +29,7 @@ fmtr/tools/name_tools.py,sha256=5CB_phqhHjl66iI8oLxOGPF2odC1apdul-M8Fv2xBhs,5514
29
29
  fmtr/tools/netrc_tools.py,sha256=PpNpz_mWlQi6VHGromKwFfTyLpHUXsd4LY6-OKLCbeI,376
30
30
  fmtr/tools/openai_tools.py,sha256=6SUgejgzUzmlKKct2_ePXntvMegu3FJgfk9x7aqtqYc,742
31
31
  fmtr/tools/parallel_tools.py,sha256=QEb_gN1StkxsqYaH4HSjiJX8Y3gpb2uKNsOzG4uFpaM,3071
32
- fmtr/tools/path_tools.py,sha256=U8D-NCOSmJuV5fD_OvLoYQQ0Ii_o8zc3_xccePpKkPo,5940
32
+ fmtr/tools/path_tools.py,sha256=BKz9dVE2BTUzWKEc0_FuGzaWRowBbu1y0nwDk2blCi0,5861
33
33
  fmtr/tools/pdf_tools.py,sha256=xvv9B84uAF81rFJRnXhSsxYuP42vY9ZdPVFrSMVe8G8,4069
34
34
  fmtr/tools/platform_tools.py,sha256=7p69CmAHe_sF68Fx9uVhns1k5EewTHTWgUYzkl6ZQKA,308
35
35
  fmtr/tools/process_tools.py,sha256=Ysh5Dk2QFBhXQerArjKdt7xZd3JrN5Ho02AaOjH0Nnw,1425
@@ -43,11 +43,11 @@ fmtr/tools/tabular_tools.py,sha256=tpIpZzYku1HcJrHZJL6BC39LmN3WUWVhFbK2N7nDVmE,1
43
43
  fmtr/tools/tokenization_tools.py,sha256=me-IBzSLyNYejLybwjO9CNB6Mj2NYfKPaOVThXyaGNg,4268
44
44
  fmtr/tools/tools.py,sha256=CAsApa1YwVdNE6H66Vjivs_mXYvOas3rh7fPELAnTpk,795
45
45
  fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
46
- fmtr/tools/version,sha256=f70hDr7BH2WpcZDvkAeVxLjaOAWvP1objR0nJVaykso,5
46
+ fmtr/tools/version,sha256=g9DE-d3AiatY4yLimLYZDyv1kdwiX_XN130F5qhCBhk,5
47
47
  fmtr/tools/version_tools.py,sha256=yNs_CGqWpqE4jbK9wsPIi14peJVXYbhIcMqHAFOw3yE,1480
48
48
  fmtr/tools/yaml_tools.py,sha256=Ol43ZwbnSXGnn1K98Uxx61KPGSqfC4axE-X2q1LKMwk,349
49
49
  fmtr/tools/ai_tools/__init__.py,sha256=JZrLuOFNV1A3wvJgonxOgz_4WS-7MfCuowGWA5uYCjs,372
50
- fmtr/tools/ai_tools/agentic_tools.py,sha256=odGzy-VA7hrNJ10VKRb5KIHReBGKZCTkp81V0cDCz6E,2755
50
+ fmtr/tools/ai_tools/agentic_tools.py,sha256=LMF7Udj8Nu7_l2VKeyDZRgY3F6GMP7CrrH9C7FTs-z8,2930
51
51
  fmtr/tools/ai_tools/inference_tools.py,sha256=yF8Oxph0L8W2CnK_o-MVztBhWVwBpgOEkx9_m3uqQww,11840
52
52
  fmtr/tools/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  fmtr/tools/tests/conftest.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -57,9 +57,9 @@ fmtr/tools/tests/test_environment.py,sha256=iHaiMQfECYZPkPKwfuIZV9uHuWe3aE-p_dN_
57
57
  fmtr/tools/tests/test_json.py,sha256=IeSP4ziPvRcmS8kq7k9tHonC9rN5YYq9GSNT2ul6Msk,287
58
58
  fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g,2188
59
59
  fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
60
- fmtr_tools-1.1.0.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
61
- fmtr_tools-1.1.0.dist-info/METADATA,sha256=xf-4jS0MbUVkScNzCNAo9fzcDsdMRpY4QtNJJ5q3uqM,14510
62
- fmtr_tools-1.1.0.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
63
- fmtr_tools-1.1.0.dist-info/entry_points.txt,sha256=Zmeyls-zo5S99SlKUmsy9ULUNmk-4B9WQCEjuPIH0Yw,142
64
- fmtr_tools-1.1.0.dist-info/top_level.txt,sha256=t5341a8ii3n4RFizwTeXGmcq_pf4GqL1h9ylE5LIWRk,12
65
- fmtr_tools-1.1.0.dist-info/RECORD,,
60
+ fmtr_tools-1.1.2.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
61
+ fmtr_tools-1.1.2.dist-info/METADATA,sha256=tDmy5jsCWjmvw0lSIqAR5BOCu7t1T-9N21wsf1NJ8K4,14529
62
+ fmtr_tools-1.1.2.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
63
+ fmtr_tools-1.1.2.dist-info/entry_points.txt,sha256=Zmeyls-zo5S99SlKUmsy9ULUNmk-4B9WQCEjuPIH0Yw,142
64
+ fmtr_tools-1.1.2.dist-info/top_level.txt,sha256=t5341a8ii3n4RFizwTeXGmcq_pf4GqL1h9ylE5LIWRk,12
65
+ fmtr_tools-1.1.2.dist-info/RECORD,,