fmtr.tools 1.0.40__tar.gz → 1.0.41__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.

Files changed (71) hide show
  1. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/PKG-INFO +1 -1
  2. fmtr.tools-1.0.41/fmtr/tools/data_modelling_tools.py +74 -0
  3. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tabular_tools.py +1 -0
  4. fmtr.tools-1.0.41/fmtr/tools/version +1 -0
  5. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr.tools.egg-info/PKG-INFO +1 -1
  6. fmtr.tools-1.0.40/fmtr/tools/data_modelling_tools.py +0 -39
  7. fmtr.tools-1.0.40/fmtr/tools/version +0 -1
  8. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/LICENSE +0 -0
  9. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/README.md +0 -0
  10. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/__init__.py +0 -0
  11. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/ai_tools/__init__.py +0 -0
  12. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/ai_tools/agentic_tools.py +0 -0
  13. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/ai_tools/inference_tools.py +0 -0
  14. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/api_tools.py +0 -0
  15. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/async_tools.py +0 -0
  16. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/augmentation_tools.py +0 -0
  17. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/caching_tools.py +0 -0
  18. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/config.py +0 -0
  19. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/config_tools.py +0 -0
  20. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/console_script_tools.py +0 -0
  21. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/dataclass_tools.py +0 -0
  22. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/datatype_tools.py +0 -0
  23. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/docker_tools.py +0 -0
  24. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/environment_tools.py +0 -0
  25. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/function_tools.py +0 -0
  26. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/google_api_tools.py +0 -0
  27. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/hash_tools.py +0 -0
  28. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/hfh_tools.py +0 -0
  29. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/html_tools.py +0 -0
  30. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/import_tools.py +0 -0
  31. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/inspection_tools.py +0 -0
  32. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/interface_tools.py +0 -0
  33. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/iterator_tools.py +0 -0
  34. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/json_fix_tools.py +0 -0
  35. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/json_tools.py +0 -0
  36. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/logging_tools.py +0 -0
  37. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/merging_tools.py +0 -0
  38. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/metric_tools.py +0 -0
  39. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/name_tools.py +0 -0
  40. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/netrc_tools.py +0 -0
  41. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/openai_tools.py +0 -0
  42. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/parallel_tools.py +0 -0
  43. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/path_tools.py +0 -0
  44. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/pdf_tools.py +0 -0
  45. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/platform_tools.py +0 -0
  46. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/process_tools.py +0 -0
  47. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/profiling_tools.py +0 -0
  48. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/random_tools.py +0 -0
  49. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/semantic_tools.py +0 -0
  50. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/spaces_tools.py +0 -0
  51. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/string_tools.py +0 -0
  52. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/__init__.py +0 -0
  53. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/conftest.py +0 -0
  54. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/helpers.py +0 -0
  55. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/test_datatype.py +0 -0
  56. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/test_environment.py +0 -0
  57. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/test_json.py +0 -0
  58. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/test_path.py +0 -0
  59. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tests/test_yaml.py +0 -0
  60. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tokenization_tools.py +0 -0
  61. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/tools.py +0 -0
  62. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/unicode_tools.py +0 -0
  63. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/version_tools.py +0 -0
  64. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr/tools/yaml_tools.py +0 -0
  65. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr.tools.egg-info/SOURCES.txt +0 -0
  66. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr.tools.egg-info/dependency_links.txt +0 -0
  67. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr.tools.egg-info/entry_points.txt +0 -0
  68. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr.tools.egg-info/requires.txt +0 -0
  69. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/fmtr.tools.egg-info/top_level.txt +0 -0
  70. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/setup.cfg +0 -0
  71. {fmtr.tools-1.0.40 → fmtr.tools-1.0.41}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fmtr.tools
3
- Version: 1.0.40
3
+ Version: 1.0.41
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
@@ -0,0 +1,74 @@
1
+ from pydantic import BaseModel, RootModel
2
+
3
+
4
+ def to_df(*objs):
5
+ """
6
+
7
+ DataFrame representation of Data Models as rows.
8
+
9
+ """
10
+ from fmtr.tools import tabular
11
+ rows = [obj.model_dump() for obj in objs]
12
+ df = tabular.DataFrame(rows)
13
+ return df
14
+
15
+
16
+ class MixinFromJson:
17
+
18
+ @classmethod
19
+ def from_json(cls, json_str):
20
+ """
21
+
22
+ Error-tolerant deserialization
23
+
24
+ """
25
+ from fmtr.tools import json_fix
26
+ data = json_fix.from_json(json_str, default={})
27
+
28
+ if type(data) is dict:
29
+ self = cls(**data)
30
+ else:
31
+ self = cls(data)
32
+
33
+ return self
34
+
35
+
36
+ class Base(BaseModel, MixinFromJson):
37
+ """
38
+
39
+ Base model
40
+
41
+ """
42
+
43
+ def to_df(self):
44
+ """
45
+
46
+ DataFrame representation with Fields as rows.
47
+
48
+ """
49
+
50
+ objs = []
51
+ for name in self.model_fields.keys():
52
+ val = getattr(self, name)
53
+ objs.append(val)
54
+
55
+ df = to_df(*objs)
56
+ df['id'] = list(self.model_fields.keys())
57
+ return df
58
+
59
+
60
+ class Root(RootModel, MixinFromJson):
61
+ """
62
+
63
+ Root (list) model
64
+
65
+ """
66
+
67
+ def to_df(self):
68
+ """
69
+
70
+ DataFrame representation with items as rows.
71
+
72
+ """
73
+
74
+ return to_df(*self.items)
@@ -1,3 +1,4 @@
1
1
  import pandas as pd
2
2
 
3
3
  DataFrame = pd.DataFrame
4
+ Series = pd.Series
@@ -0,0 +1 @@
1
+ 1.0.41
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fmtr.tools
3
- Version: 1.0.40
3
+ Version: 1.0.41
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
@@ -1,39 +0,0 @@
1
- from pydantic import BaseModel, RootModel
2
-
3
-
4
- class MixinFromJson:
5
-
6
- @classmethod
7
- def from_json(cls, json_str):
8
- """
9
-
10
- Error-tolerant deserialization
11
-
12
- """
13
- from fmtr.tools import json_fix
14
- data = json_fix.from_json(json_str, default={})
15
-
16
- if type(data) is dict:
17
- self = cls(**data)
18
- else:
19
- self = cls(data)
20
-
21
- return self
22
-
23
-
24
- class Base(BaseModel, MixinFromJson):
25
- """
26
-
27
- Base model
28
-
29
- """
30
- ...
31
-
32
-
33
- class Root(RootModel, MixinFromJson):
34
- """
35
-
36
- Root (list) model
37
-
38
- """
39
- ...
@@ -1 +0,0 @@
1
- 1.0.40
File without changes
File without changes
File without changes
File without changes