pythagoras 0.23.16__tar.gz → 0.23.18__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.
Files changed (65) hide show
  1. {pythagoras-0.23.16 → pythagoras-0.23.18}/PKG-INFO +110 -3
  2. {pythagoras-0.23.16 → pythagoras-0.23.18}/README.md +109 -2
  3. {pythagoras-0.23.16 → pythagoras-0.23.18}/pyproject.toml +1 -1
  4. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/.DS_Store +0 -0
  5. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/__init__.py +0 -0
  6. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/basic_portal_core_classes.py +0 -0
  7. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/exceptions.py +0 -0
  8. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/long_infoname.py +0 -0
  9. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/not_picklable_class.py +0 -0
  10. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/portal_tester.py +0 -0
  11. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_010_basic_portals/post_init_metaclass.py +0 -0
  12. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_020_ordinary_code_portals/__init__.py +0 -0
  13. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_020_ordinary_code_portals/code_normalizer.py +0 -0
  14. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_020_ordinary_code_portals/function_processing.py +0 -0
  15. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_020_ordinary_code_portals/ordinary_decorator.py +0 -0
  16. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py +0 -0
  17. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_030_data_portals/__init__.py +0 -0
  18. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_030_data_portals/data_portal_core_classes.py +0 -0
  19. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_030_data_portals/ready_and_get.py +0 -0
  20. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_030_data_portals/storable_decorator.py +0 -0
  21. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/__init__.py +0 -0
  22. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/exception_processing_tracking.py +0 -0
  23. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/execution_environment_summary.py +0 -0
  24. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/kw_args.py +0 -0
  25. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/logging_decorator.py +0 -0
  26. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/logging_portal_core_classes.py +0 -0
  27. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/notebook_checker.py +0 -0
  28. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/output_capturer.py +0 -0
  29. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_040_logging_code_portals/uncaught_exceptions.py +0 -0
  30. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_050_safe_code_portals/__init__.py +0 -0
  31. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_050_safe_code_portals/safe_decorator.py +0 -0
  32. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_050_safe_code_portals/safe_portal_core_classes.py +0 -0
  33. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_060_autonomous_code_portals/__init__.py +0 -0
  34. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +0 -0
  35. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +0 -0
  36. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +0 -0
  37. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/__init__.py +0 -0
  38. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/basic_pre_validators.py +0 -0
  39. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +0 -0
  40. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/list_flattener.py +0 -0
  41. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/package_manager.py +0 -0
  42. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/protected_decorators.py +0 -0
  43. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +0 -0
  44. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/system_utils.py +0 -0
  45. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_070_protected_code_portals/validation_succesful_const.py +0 -0
  46. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_080_pure_code_portals/__init__.py +0 -0
  47. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py +0 -0
  48. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_080_pure_code_portals/pure_decorator.py +0 -0
  49. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_080_pure_code_portals/recursion_pre_validator.py +0 -0
  50. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_090_swarming_portals/__init__.py +0 -0
  51. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_090_swarming_portals/output_suppressor.py +0 -0
  52. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_090_swarming_portals/swarming_portals.py +0 -0
  53. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_100_top_level_API/__init__.py +0 -0
  54. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_100_top_level_API/default_local_portal.py +0 -0
  55. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_100_top_level_API/top_level_API.py +0 -0
  56. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_800_signatures_and_converters/__init__.py +0 -0
  57. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +0 -0
  58. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +0 -0
  59. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_800_signatures_and_converters/hash_signatures.py +0 -0
  60. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_800_signatures_and_converters/node_signature.py +0 -0
  61. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_800_signatures_and_converters/random_signatures.py +0 -0
  62. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_900_project_stats_collector/__init__.py +0 -0
  63. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/_900_project_stats_collector/project_analyzer.py +0 -0
  64. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/__init__.py +0 -0
  65. {pythagoras-0.23.16 → pythagoras-0.23.18}/src/pythagoras/core/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pythagoras
3
- Version: 0.23.16
3
+ Version: 0.23.18
4
4
  Summary: Planet-scale distributed computing in Python.
5
5
  Keywords: cloud,ML,AI,serverless,distributed,parallel,machine-learning,deep-learning,pythagoras
6
6
  Author: Volodymyr (Vlad) Pavlov
@@ -66,7 +66,7 @@ data science, machine learning, and AI workflows.
66
66
  Pythagoras excels at complex, long-running, resource-demanding computations.
67
67
  It’s not recommended for real-time, latency-sensitive workflows.
68
68
 
69
- ## Usage
69
+ ## Tutorials
70
70
 
71
71
  Pythagoras elevates two popular techniques — memoization and parallelization —
72
72
  to a global scale and then fuses them, unlocking performance and scalability
@@ -87,7 +87,114 @@ preferred functional patterns, augmented by new capabilities.
87
87
 
88
88
  ## Videos
89
89
 
90
- [Data Phoenix Webinar, August 27, 2025](https://youtu.be/eb6_atu1RQI) ([slides](https://docs.google.com/presentation/d/1fGBqnp0aqVHPJ-BYGYnUll1_TJI_WObAbEVX89Z3-yA))
90
+ * [Data Phoenix Webinar, August 27, 2025](https://youtu.be/eb6_atu1RQI) ([slides](https://docs.google.com/presentation/d/1fGBqnp0aqVHPJ-BYGYnUll1_TJI_WObAbEVX89Z3-yA))
91
+
92
+
93
+ ## Usage Examples
94
+
95
+ Importing Pythagoras:
96
+ ```python
97
+ from pythagoras.core import *
98
+ import pythagoras as pth
99
+ ```
100
+
101
+ Creating a portal based on a (shared) folder:
102
+ ```python
103
+ my_portal = get_portal("./my_local_folder")
104
+ ```
105
+
106
+ Checking the state of a portal:
107
+ ```python
108
+ my_portal.describe()
109
+ ```
110
+
111
+ Decorating a function:
112
+ ```python
113
+ @pure()
114
+ def my_long_running_function(a:float, b:float) -> float:
115
+ from time import sleep # imports must be placed inside a pure function
116
+ sleep(5)
117
+ return a+10*b
118
+ ```
119
+
120
+ Using a decorated function synchronously:
121
+ ```python
122
+ result = my_long_running_function(a=1, b=2) # only named arguments are allowed
123
+ ```
124
+
125
+ Using a decorated function asynchronously:
126
+ ```python
127
+ future_result_address = my_long_running_function.swarm(a=10, b=20)
128
+ if ready(future_result_address):
129
+ result = get(future_result_address)
130
+ ```
131
+
132
+ Pre-conditions for executing a function:
133
+ ```python
134
+ @pure(pre_validators=[
135
+ unused_ram(Gb=5),
136
+ installed_packages("scikit-learn","pandas"),
137
+ unused_cpu(cores=10)])
138
+ def my_long_running_function(a:float, b:float) -> float:
139
+ from time import sleep
140
+ sleep(5)
141
+ return a+10*b
142
+ ```
143
+
144
+ Recursion:
145
+ ```python
146
+ @pure(pre_validators=[recursive_parameters("n")])
147
+ def factorial(n:int)->int:
148
+ if n == 1:
149
+ return 1
150
+ else:
151
+ return n*factorial(n=n-1) # only named arguments are allowed
152
+ ```
153
+
154
+ Partial function application:
155
+ ```python
156
+ @pure()
157
+ def my_map(input_list:list, transformer: PureFn)->list:
158
+ result = []
159
+ for element in input_list:
160
+ transformed_element = transformer(x=element)
161
+ result.append(transformed_element)
162
+ return result
163
+
164
+ @pure()
165
+ def my_square(x):
166
+ return x*x
167
+
168
+ result = my_map(input_list=[1,2,3,4,5], transformer=my_square)
169
+
170
+ my_square_map = my_map.fix_kwargs(transformer = my_square)
171
+
172
+ result = my_square_map(input_list=[1,2,3,4,5])
173
+ ```
174
+
175
+ Mutually recursive functions:
176
+ ```python
177
+ @pure(pre_validators=recursive_parameters("n"))
178
+ def is_even(n:int, is_odd ,is_even)->bool:
179
+ if n in {0,2}:
180
+ return True
181
+ else:
182
+ return is_odd(n=n-1, is_even=is_even, is_odd=is_odd)
183
+
184
+ @pure(pre_validators=recursive_parameters("n"))
185
+ def is_odd(n:int, is_even, is_odd)->bool:
186
+ if n in {0,2}:
187
+ return False
188
+ else:
189
+ return is_even(n=n-1, is_odd=is_odd, is_even=is_even)
190
+
191
+ (is_even, is_odd) = (
192
+ is_even.fix_kwargs(is_odd=is_odd, is_even=is_even)
193
+ , is_odd.fix_kwargs(is_odd=is_odd, is_even=is_even) )
194
+
195
+ assert is_even(n=10)
196
+ assert is_odd(n=11)
197
+ ```
91
198
 
92
199
  ## How to get it?
93
200
 
@@ -14,7 +14,7 @@ data science, machine learning, and AI workflows.
14
14
  Pythagoras excels at complex, long-running, resource-demanding computations.
15
15
  It’s not recommended for real-time, latency-sensitive workflows.
16
16
 
17
- ## Usage
17
+ ## Tutorials
18
18
 
19
19
  Pythagoras elevates two popular techniques — memoization and parallelization —
20
20
  to a global scale and then fuses them, unlocking performance and scalability
@@ -35,7 +35,114 @@ preferred functional patterns, augmented by new capabilities.
35
35
 
36
36
  ## Videos
37
37
 
38
- [Data Phoenix Webinar, August 27, 2025](https://youtu.be/eb6_atu1RQI) ([slides](https://docs.google.com/presentation/d/1fGBqnp0aqVHPJ-BYGYnUll1_TJI_WObAbEVX89Z3-yA))
38
+ * [Data Phoenix Webinar, August 27, 2025](https://youtu.be/eb6_atu1RQI) ([slides](https://docs.google.com/presentation/d/1fGBqnp0aqVHPJ-BYGYnUll1_TJI_WObAbEVX89Z3-yA))
39
+
40
+
41
+ ## Usage Examples
42
+
43
+ Importing Pythagoras:
44
+ ```python
45
+ from pythagoras.core import *
46
+ import pythagoras as pth
47
+ ```
48
+
49
+ Creating a portal based on a (shared) folder:
50
+ ```python
51
+ my_portal = get_portal("./my_local_folder")
52
+ ```
53
+
54
+ Checking the state of a portal:
55
+ ```python
56
+ my_portal.describe()
57
+ ```
58
+
59
+ Decorating a function:
60
+ ```python
61
+ @pure()
62
+ def my_long_running_function(a:float, b:float) -> float:
63
+ from time import sleep # imports must be placed inside a pure function
64
+ sleep(5)
65
+ return a+10*b
66
+ ```
67
+
68
+ Using a decorated function synchronously:
69
+ ```python
70
+ result = my_long_running_function(a=1, b=2) # only named arguments are allowed
71
+ ```
72
+
73
+ Using a decorated function asynchronously:
74
+ ```python
75
+ future_result_address = my_long_running_function.swarm(a=10, b=20)
76
+ if ready(future_result_address):
77
+ result = get(future_result_address)
78
+ ```
79
+
80
+ Pre-conditions for executing a function:
81
+ ```python
82
+ @pure(pre_validators=[
83
+ unused_ram(Gb=5),
84
+ installed_packages("scikit-learn","pandas"),
85
+ unused_cpu(cores=10)])
86
+ def my_long_running_function(a:float, b:float) -> float:
87
+ from time import sleep
88
+ sleep(5)
89
+ return a+10*b
90
+ ```
91
+
92
+ Recursion:
93
+ ```python
94
+ @pure(pre_validators=[recursive_parameters("n")])
95
+ def factorial(n:int)->int:
96
+ if n == 1:
97
+ return 1
98
+ else:
99
+ return n*factorial(n=n-1) # only named arguments are allowed
100
+ ```
101
+
102
+ Partial function application:
103
+ ```python
104
+ @pure()
105
+ def my_map(input_list:list, transformer: PureFn)->list:
106
+ result = []
107
+ for element in input_list:
108
+ transformed_element = transformer(x=element)
109
+ result.append(transformed_element)
110
+ return result
111
+
112
+ @pure()
113
+ def my_square(x):
114
+ return x*x
115
+
116
+ result = my_map(input_list=[1,2,3,4,5], transformer=my_square)
117
+
118
+ my_square_map = my_map.fix_kwargs(transformer = my_square)
119
+
120
+ result = my_square_map(input_list=[1,2,3,4,5])
121
+ ```
122
+
123
+ Mutually recursive functions:
124
+ ```python
125
+ @pure(pre_validators=recursive_parameters("n"))
126
+ def is_even(n:int, is_odd ,is_even)->bool:
127
+ if n in {0,2}:
128
+ return True
129
+ else:
130
+ return is_odd(n=n-1, is_even=is_even, is_odd=is_odd)
131
+
132
+ @pure(pre_validators=recursive_parameters("n"))
133
+ def is_odd(n:int, is_even, is_odd)->bool:
134
+ if n in {0,2}:
135
+ return False
136
+ else:
137
+ return is_even(n=n-1, is_odd=is_odd, is_even=is_even)
138
+
139
+ (is_even, is_odd) = (
140
+ is_even.fix_kwargs(is_odd=is_odd, is_even=is_even)
141
+ , is_odd.fix_kwargs(is_odd=is_odd, is_even=is_even) )
142
+
143
+ assert is_even(n=10)
144
+ assert is_odd(n=11)
145
+ ```
39
146
 
40
147
  ## How to get it?
41
148
 
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "pythagoras"
7
- version = "0.23.16"
7
+ version = "0.23.18"
8
8
  authors = [
9
9
  {name = "Volodymyr (Vlad) Pavlov", email = "vlpavlov@ieee.org"},
10
10
  ]