fmtr.tools 1.1.10__py3-none-any.whl → 1.1.11__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 +1 -1
- fmtr/tools/path_tools/__init__.py +7 -0
- fmtr/tools/path_tools/app.py +40 -0
- fmtr/tools/{path_tools.py → path_tools/base.py} +12 -2
- fmtr/tools/version +1 -1
- {fmtr_tools-1.1.10.dist-info → fmtr_tools-1.1.11.dist-info}/METADATA +40 -36
- {fmtr_tools-1.1.10.dist-info → fmtr_tools-1.1.11.dist-info}/RECORD +11 -9
- {fmtr_tools-1.1.10.dist-info → fmtr_tools-1.1.11.dist-info}/WHEEL +0 -0
- {fmtr_tools-1.1.10.dist-info → fmtr_tools-1.1.11.dist-info}/entry_points.txt +0 -0
- {fmtr_tools-1.1.10.dist-info → fmtr_tools-1.1.11.dist-info}/licenses/LICENSE +0 -0
- {fmtr_tools-1.1.10.dist-info → fmtr_tools-1.1.11.dist-info}/top_level.txt +0 -0
fmtr/tools/__init__.py
CHANGED
|
@@ -23,7 +23,7 @@ import fmtr.tools.packaging_tools as packaging
|
|
|
23
23
|
from fmtr.tools.logging_tools import logger
|
|
24
24
|
|
|
25
25
|
from fmtr.tools.import_tools import MissingExtraMockModule
|
|
26
|
-
from fmtr.tools.path_tools import Path, PackagePaths
|
|
26
|
+
from fmtr.tools.path_tools import Path, PackagePaths, AppPaths
|
|
27
27
|
from fmtr.tools.constants import Constants
|
|
28
28
|
|
|
29
29
|
try:
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from fmtr.tools.import_tools import MissingExtraMockModule
|
|
2
|
+
from fmtr.tools.path_tools.base import Path, PackagePaths
|
|
3
|
+
|
|
4
|
+
try:
|
|
5
|
+
from fmtr.tools.path_tools.app import AppPaths
|
|
6
|
+
except ImportError as exception:
|
|
7
|
+
AppPaths = MissingExtraMockModule('path.app', exception)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import appdirs
|
|
2
|
+
|
|
3
|
+
from fmtr.tools.path_tools import Path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AppPaths:
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
Wrap appdirs to return Path objects
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
PathType = Path
|
|
13
|
+
|
|
14
|
+
def user_data_dir(self, appname=None, appauthor=None, version=None, roaming=False):
|
|
15
|
+
path_str = appdirs.user_data_dir(appname=appname, appauthor=appauthor, version=version, roaming=roaming)
|
|
16
|
+
return self.PathType(path_str)
|
|
17
|
+
|
|
18
|
+
def user_config_dir(self, appname=None, appauthor=None, version=None, roaming=False):
|
|
19
|
+
path_str = appdirs.user_config_dir(appname=appname, appauthor=appauthor, version=version, roaming=roaming)
|
|
20
|
+
return self.PathType(path_str)
|
|
21
|
+
|
|
22
|
+
def site_config_dir(self, appname=None, appauthor=None, version=None):
|
|
23
|
+
path_str = appdirs.site_config_dir(appname=appname, appauthor=appauthor, version=version, multipath=False)
|
|
24
|
+
return self.PathType(path_str)
|
|
25
|
+
|
|
26
|
+
def site_data_dir(self, appname=None, appauthor=None, version=None):
|
|
27
|
+
path_str = appdirs.site_data_dir(appname=appname, appauthor=appauthor, version=version, multipath=False)
|
|
28
|
+
return self.PathType(path_str)
|
|
29
|
+
|
|
30
|
+
def user_cache_dir(self, appname=None, appauthor=None, version=None):
|
|
31
|
+
path_str = appdirs.user_cache_dir(appname=appname, appauthor=appauthor, version=version)
|
|
32
|
+
return self.PathType(path_str)
|
|
33
|
+
|
|
34
|
+
def user_state_dir(self, appname=None, appauthor=None, version=None):
|
|
35
|
+
path_str = appdirs.user_state_dir(appname=appname, appauthor=appauthor, version=version)
|
|
36
|
+
return self.PathType(path_str)
|
|
37
|
+
|
|
38
|
+
def user_log_dir(self, appname=None, appauthor=None, version=None):
|
|
39
|
+
path_str = appdirs.user_log_dir(appname=appname, appauthor=appauthor, version=version)
|
|
40
|
+
return self.PathType(path_str)
|
|
@@ -154,6 +154,15 @@ class Path(type(Path())):
|
|
|
154
154
|
"""
|
|
155
155
|
return super().exists()
|
|
156
156
|
|
|
157
|
+
@classmethod
|
|
158
|
+
def app(cls):
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
Convenience method for getting application paths
|
|
162
|
+
|
|
163
|
+
"""
|
|
164
|
+
from fmtr.tools import path
|
|
165
|
+
return path.AppPaths()
|
|
157
166
|
|
|
158
167
|
class PackagePaths:
|
|
159
168
|
"""
|
|
@@ -315,5 +324,6 @@ class PackagePaths:
|
|
|
315
324
|
|
|
316
325
|
|
|
317
326
|
if __name__ == "__main__":
|
|
318
|
-
|
|
319
|
-
|
|
327
|
+
path = Path()
|
|
328
|
+
path.app.user_log_dir()
|
|
329
|
+
path
|
fmtr/tools/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.11
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.11
|
|
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,51 +9,52 @@ 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: pydantic-settings; extra == "test"
|
|
13
|
-
Requires-Dist: flet-video; extra == "test"
|
|
14
|
-
Requires-Dist: pydantic; extra == "test"
|
|
15
|
-
Requires-Dist: pymupdf; extra == "test"
|
|
16
12
|
Requires-Dist: flet-webview; extra == "test"
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: fastapi; extra == "test"
|
|
14
|
+
Requires-Dist: pymupdf4llm; extra == "test"
|
|
15
|
+
Requires-Dist: Unidecode; extra == "test"
|
|
16
|
+
Requires-Dist: semver; extra == "test"
|
|
17
|
+
Requires-Dist: pydantic-settings; extra == "test"
|
|
18
|
+
Requires-Dist: google-auth-httplib2; extra == "test"
|
|
20
19
|
Requires-Dist: pandas; extra == "test"
|
|
21
|
-
Requires-Dist: pytest-cov; extra == "test"
|
|
22
20
|
Requires-Dist: google-auth-oauthlib; extra == "test"
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist:
|
|
21
|
+
Requires-Dist: openai; extra == "test"
|
|
22
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
23
|
+
Requires-Dist: transformers[sentencepiece]; extra == "test"
|
|
25
24
|
Requires-Dist: logfire; extra == "test"
|
|
25
|
+
Requires-Dist: pydantic; extra == "test"
|
|
26
|
+
Requires-Dist: deepmerge; extra == "test"
|
|
27
|
+
Requires-Dist: pymupdf; extra == "test"
|
|
28
|
+
Requires-Dist: sentence_transformers; extra == "test"
|
|
26
29
|
Requires-Dist: html2text; extra == "test"
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist: pydevd-pycharm; extra == "test"
|
|
29
|
-
Requires-Dist: bokeh; extra == "test"
|
|
30
|
-
Requires-Dist: dask[bag]; extra == "test"
|
|
31
|
-
Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
|
|
32
|
-
Requires-Dist: contexttimer; extra == "test"
|
|
30
|
+
Requires-Dist: sre_yield; extra == "test"
|
|
33
31
|
Requires-Dist: flet[all]; extra == "test"
|
|
32
|
+
Requires-Dist: peft; extra == "test"
|
|
33
|
+
Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
|
|
34
|
+
Requires-Dist: appdirs; extra == "test"
|
|
34
35
|
Requires-Dist: google-api-python-client; extra == "test"
|
|
36
|
+
Requires-Dist: json_repair; extra == "test"
|
|
37
|
+
Requires-Dist: dask[bag]; extra == "test"
|
|
38
|
+
Requires-Dist: torchaudio; extra == "test"
|
|
39
|
+
Requires-Dist: google-auth; extra == "test"
|
|
35
40
|
Requires-Dist: tabulate; extra == "test"
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist: tinynetrc; extra == "test"
|
|
38
|
-
Requires-Dist: distributed; extra == "test"
|
|
39
|
-
Requires-Dist: yamlscript; extra == "test"
|
|
41
|
+
Requires-Dist: tokenizers; extra == "test"
|
|
40
42
|
Requires-Dist: ollama; extra == "test"
|
|
41
|
-
Requires-Dist:
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist: uvicorn[standard]; extra == "test"
|
|
44
|
-
Requires-Dist: docker; extra == "test"
|
|
43
|
+
Requires-Dist: torchvision; extra == "test"
|
|
44
|
+
Requires-Dist: yamlscript; extra == "test"
|
|
45
45
|
Requires-Dist: faker; extra == "test"
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist:
|
|
48
|
-
Requires-Dist:
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist: pymupdf4llm; extra == "test"
|
|
51
|
-
Requires-Dist: torchaudio; extra == "test"
|
|
52
|
-
Requires-Dist: google-auth; extra == "test"
|
|
53
|
-
Requires-Dist: diskcache; extra == "test"
|
|
54
|
-
Requires-Dist: fastapi; extra == "test"
|
|
46
|
+
Requires-Dist: bokeh; extra == "test"
|
|
47
|
+
Requires-Dist: docker; extra == "test"
|
|
48
|
+
Requires-Dist: tinynetrc; extra == "test"
|
|
49
|
+
Requires-Dist: uvicorn[standard]; extra == "test"
|
|
55
50
|
Requires-Dist: openpyxl; extra == "test"
|
|
56
|
-
Requires-Dist:
|
|
51
|
+
Requires-Dist: diskcache; extra == "test"
|
|
52
|
+
Requires-Dist: pydevd-pycharm; extra == "test"
|
|
53
|
+
Requires-Dist: logfire[fastapi]; extra == "test"
|
|
54
|
+
Requires-Dist: contexttimer; extra == "test"
|
|
55
|
+
Requires-Dist: distributed; extra == "test"
|
|
56
|
+
Requires-Dist: flet-video; extra == "test"
|
|
57
|
+
Requires-Dist: huggingface_hub; extra == "test"
|
|
57
58
|
Provides-Extra: yaml
|
|
58
59
|
Requires-Dist: yamlscript; extra == "yaml"
|
|
59
60
|
Provides-Extra: logging
|
|
@@ -149,6 +150,8 @@ Requires-Dist: pydevd-pycharm; extra == "debug"
|
|
|
149
150
|
Provides-Extra: sets
|
|
150
151
|
Requires-Dist: pydantic-settings; extra == "sets"
|
|
151
152
|
Requires-Dist: pydantic; extra == "sets"
|
|
153
|
+
Provides-Extra: path-app
|
|
154
|
+
Requires-Dist: appdirs; extra == "path-app"
|
|
152
155
|
Dynamic: author
|
|
153
156
|
Dynamic: author-email
|
|
154
157
|
Dynamic: description
|
|
@@ -283,9 +286,10 @@ The included modules, plus any extra requirements, are as follows:
|
|
|
283
286
|
- `tools.Path`: Enhanced
|
|
284
287
|
`pathlib.Path` object with additional functionality for Windows-to-Unix path conversion in WSL environments, reading/writing JSON and YAML files with proper encoding.
|
|
285
288
|
- Extras: None
|
|
286
|
-
-
|
|
287
289
|
`tools.PackagePaths` class for managing canonical package paths, like settings files, artifact directories, version files.
|
|
288
290
|
- Extras: None
|
|
291
|
+
`tools.AppPaths` Wrapper around `appdirs` for application paths.
|
|
292
|
+
- Extras: `paths.app`
|
|
289
293
|
- `tools.platform`: Detecting if host is WSL, Docker etc.
|
|
290
294
|
- Extras: None
|
|
291
295
|
- `tools.ContextProcess`: Manages a function running in a separate process using a context manager. Provides methods to start, stop, and restart the process, with configurable restart delays. Useful for ensuring clean process management and automatic stopping when the context manager exits.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
fmtr/tools/__init__.py,sha256=
|
|
1
|
+
fmtr/tools/__init__.py,sha256=LbCse2Z1oZh3ENnb3_A5xwtC58IGNEJIn0faBNdgOGA,5253
|
|
2
2
|
fmtr/tools/api_tools.py,sha256=w8Zrp_EwN5KlUghwLoTCXo4z1irg5tAsReCqDLjASfE,2133
|
|
3
3
|
fmtr/tools/async_tools.py,sha256=ewz757WcveQJd-G5SVr2JDOQVbdLGecCgl-tsBGVZz4,284
|
|
4
4
|
fmtr/tools/augmentation_tools.py,sha256=-6ESbO4CDlKqVOV1J1V6qBeoBMzbFIinkDHRHnCBej0,55
|
|
@@ -30,7 +30,6 @@ 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/packaging_tools.py,sha256=FlgOTnDRHZWQL2iR-wucTsyGEHRE-MlddKL30MPmUqE,253
|
|
32
32
|
fmtr/tools/parallel_tools.py,sha256=QEb_gN1StkxsqYaH4HSjiJX8Y3gpb2uKNsOzG4uFpaM,3071
|
|
33
|
-
fmtr/tools/path_tools.py,sha256=f4FOFhWdC5U1yeMtHPQatvXhs6cCTCC4RuPoLZo0kRE,7094
|
|
34
33
|
fmtr/tools/pdf_tools.py,sha256=xvv9B84uAF81rFJRnXhSsxYuP42vY9ZdPVFrSMVe8G8,4069
|
|
35
34
|
fmtr/tools/platform_tools.py,sha256=7p69CmAHe_sF68Fx9uVhns1k5EewTHTWgUYzkl6ZQKA,308
|
|
36
35
|
fmtr/tools/process_tools.py,sha256=Ysh5Dk2QFBhXQerArjKdt7xZd3JrN5Ho02AaOjH0Nnw,1425
|
|
@@ -44,12 +43,15 @@ fmtr/tools/tabular_tools.py,sha256=tpIpZzYku1HcJrHZJL6BC39LmN3WUWVhFbK2N7nDVmE,1
|
|
|
44
43
|
fmtr/tools/tokenization_tools.py,sha256=me-IBzSLyNYejLybwjO9CNB6Mj2NYfKPaOVThXyaGNg,4268
|
|
45
44
|
fmtr/tools/tools.py,sha256=CAsApa1YwVdNE6H66Vjivs_mXYvOas3rh7fPELAnTpk,795
|
|
46
45
|
fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
|
|
47
|
-
fmtr/tools/version,sha256=
|
|
46
|
+
fmtr/tools/version,sha256=ru3slBiEnrsfqniKVioHigGLwx3RDu7XA86xIx6JHzg,6
|
|
48
47
|
fmtr/tools/version_tools.py,sha256=yNs_CGqWpqE4jbK9wsPIi14peJVXYbhIcMqHAFOw3yE,1480
|
|
49
48
|
fmtr/tools/yaml_tools.py,sha256=RVm-PuTv5XNneMea9iZ-x-oI3UdpbLi2-KA0rSf2ybk,1537
|
|
50
49
|
fmtr/tools/ai_tools/__init__.py,sha256=JZrLuOFNV1A3wvJgonxOgz_4WS-7MfCuowGWA5uYCjs,372
|
|
51
50
|
fmtr/tools/ai_tools/agentic_tools.py,sha256=YebH7R9ovVo3GzfWAZxY49e2fNt13APDMe290xx7zks,3720
|
|
52
51
|
fmtr/tools/ai_tools/inference_tools.py,sha256=yF8Oxph0L8W2CnK_o-MVztBhWVwBpgOEkx9_m3uqQww,11840
|
|
52
|
+
fmtr/tools/path_tools/__init__.py,sha256=HENHHpkyBwSm2VTWV0Fz8FP3WjgjjhnR0TYPNbSSpyQ,268
|
|
53
|
+
fmtr/tools/path_tools/app.py,sha256=JrJvtTDd_gkCKcZtBCDTMktsM77PZwGV_hzQX0g5GU8,1722
|
|
54
|
+
fmtr/tools/path_tools/base.py,sha256=DOWXky4DOLqkrbw7fGP8StaAFiqSJqe_oYW_qCKuPrU,7297
|
|
53
55
|
fmtr/tools/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
56
|
fmtr/tools/tests/conftest.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
57
|
fmtr/tools/tests/helpers.py,sha256=N5sf9YoZV93a7tf_UxpLeyQ9vp6Ec0teNIimFDvc054,1091
|
|
@@ -58,9 +60,9 @@ fmtr/tools/tests/test_environment.py,sha256=iHaiMQfECYZPkPKwfuIZV9uHuWe3aE-p_dN_
|
|
|
58
60
|
fmtr/tools/tests/test_json.py,sha256=IeSP4ziPvRcmS8kq7k9tHonC9rN5YYq9GSNT2ul6Msk,287
|
|
59
61
|
fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g,2188
|
|
60
62
|
fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
|
|
61
|
-
fmtr_tools-1.1.
|
|
62
|
-
fmtr_tools-1.1.
|
|
63
|
-
fmtr_tools-1.1.
|
|
64
|
-
fmtr_tools-1.1.
|
|
65
|
-
fmtr_tools-1.1.
|
|
66
|
-
fmtr_tools-1.1.
|
|
63
|
+
fmtr_tools-1.1.11.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
|
|
64
|
+
fmtr_tools-1.1.11.dist-info/METADATA,sha256=-HlRFfrUTtI4k10csfs6idMFnFYMkF8ikUM_nD3BQJk,14855
|
|
65
|
+
fmtr_tools-1.1.11.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
66
|
+
fmtr_tools-1.1.11.dist-info/entry_points.txt,sha256=e-eOW1Ml13tbxHC6Er1MnVOEDePeWw7DKwlE-l-gCY0,205
|
|
67
|
+
fmtr_tools-1.1.11.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
|
|
68
|
+
fmtr_tools-1.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|