pythagoras 0.24.4__py3-none-any.whl → 0.24.7__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.
Files changed (27) hide show
  1. pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +31 -4
  2. pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +94 -14
  3. pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +133 -4
  4. pythagoras/_070_protected_code_portals/basic_pre_validators.py +130 -15
  5. pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +20 -18
  6. pythagoras/_070_protected_code_portals/list_flattener.py +45 -7
  7. pythagoras/_070_protected_code_portals/package_manager.py +99 -24
  8. pythagoras/_070_protected_code_portals/protected_decorators.py +59 -1
  9. pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +239 -4
  10. pythagoras/_070_protected_code_portals/system_utils.py +85 -12
  11. pythagoras/_070_protected_code_portals/validation_succesful_const.py +12 -7
  12. pythagoras/_080_pure_code_portals/pure_core_classes.py +178 -25
  13. pythagoras/_080_pure_code_portals/pure_decorator.py +37 -0
  14. pythagoras/_080_pure_code_portals/recursion_pre_validator.py +39 -0
  15. pythagoras/_090_swarming_portals/output_suppressor.py +32 -3
  16. pythagoras/_090_swarming_portals/swarming_portals.py +165 -19
  17. pythagoras/_100_top_level_API/__init__.py +11 -0
  18. pythagoras/_800_signatures_and_converters/__init__.py +17 -0
  19. pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +55 -20
  20. pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +20 -5
  21. pythagoras/_800_signatures_and_converters/hash_signatures.py +46 -10
  22. pythagoras/_800_signatures_and_converters/node_signature.py +27 -12
  23. pythagoras/_800_signatures_and_converters/random_signatures.py +14 -3
  24. pythagoras/core/__init__.py +54 -0
  25. {pythagoras-0.24.4.dist-info → pythagoras-0.24.7.dist-info}/METADATA +1 -1
  26. {pythagoras-0.24.4.dist-info → pythagoras-0.24.7.dist-info}/RECORD +27 -27
  27. {pythagoras-0.24.4.dist-info → pythagoras-0.24.7.dist-info}/WHEEL +0 -0
@@ -1,3 +1,57 @@
1
+ """Pythagoras core convenience namespace.
2
+
3
+ This module re-exports the most frequently used decorators, classes, and
4
+ helpers from the Pythagoras subpackages, providing a compact import surface
5
+ for day‑to‑day work. It is safe to use either explicit imports or a star import
6
+ from this module depending on your style and needs.
7
+
8
+ Public API
9
+ ready, get
10
+ Utilities for working with addressable values. "ready(obj)" recursively
11
+ checks that all ValueAddr/HashAddr objects inside a nested structure are
12
+ ready. "get(obj)" deep‑copies a structure and replaces every contained
13
+ address with the concrete value via .get().
14
+
15
+ pure, recursive_parameters, PureFn
16
+ Decorator and helpers for pure functions. A pure function is assumed to
17
+ be deterministic and side‑effect free; Pythagoras persistently caches
18
+ its results by call signature and tracks source‑code changes. The
19
+ "recursive_parameters(...)" factory returns pre‑validators used to
20
+ optimize recursive computations.
21
+
22
+ autonomous
23
+ Decorator for declaring an autonomous function: implementation must be
24
+ self‑contained (imports done inside the body, no nonlocal/global state
25
+ except built‑ins), with autonomicity validated at decoration and at
26
+ runtime.
27
+
28
+ Basic pre‑validators
29
+ Small, composable validators intended to be attached to pure functions,
30
+ for example::
31
+
32
+ - unused_cpu(cores: int)
33
+ - unused_ram(Gb: int)
34
+ - installed_packages(*names: str)
35
+
36
+ These factories return validator instances (SimplePreValidatorFn) that
37
+ a portal can execute to check whether it should run the user code.
38
+
39
+ SwarmingPortal
40
+ Portal enabling asynchronous, distributed ("swarming") execution of
41
+ pure functions across background workers and processes. Execution is
42
+ best‑effort with eventual‑execution semantics.
43
+
44
+ get_portal
45
+ Factory for constructing a portal.
46
+
47
+ Notes
48
+ - Star‑importing from this module will also bring the basic pre‑validators
49
+ into your namespace. Prefer explicit imports if you want a stricter
50
+ namespace.
51
+ - This namespace focuses on high‑impact primitives. For advanced or
52
+ lower‑level APIs, import directly from the corresponding subpackages.
53
+ """
54
+
1
55
  from .._030_data_portals import ready, get
2
56
  from .._060_autonomous_code_portals import autonomous
3
57
  from .._070_protected_code_portals.basic_pre_validators import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pythagoras
3
- Version: 0.24.4
3
+ Version: 0.24.7
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
@@ -27,38 +27,38 @@ pythagoras/_050_safe_code_portals/__init__.py,sha256=YR-V6W2WZ17SjqmTyY2xdY16xTV
27
27
  pythagoras/_050_safe_code_portals/safe_decorator.py,sha256=AYvX7-km2reRMZ55ndO_2IS2SfHbnpyFv79AVwGg7Po,1681
28
28
  pythagoras/_050_safe_code_portals/safe_portal_core_classes.py,sha256=naY4R91N5bcCq8C_-YeBqhrr6UG8zkEQ5t8C3O8ytOw,5673
29
29
  pythagoras/_060_autonomous_code_portals/__init__.py,sha256=hnv_dxxRx8c7IDf1QgVYHfYoeVAz8oD9K0oWI_o9N20,1704
30
- pythagoras/_060_autonomous_code_portals/autonomous_decorators.py,sha256=diWX03jZaInc55jAg391ZRBh-St5exJRLDZiS7dqYvg,2895
31
- pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py,sha256=21JNwBgEoIHXwCrBPb_eN5vMaHTZ98LdFkHuaMHtkI0,6665
32
- pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py,sha256=mqrzAQw3tGxPYXsMA8E0fhhIpJopvRFrzkc1MVSsPXQ,7474
30
+ pythagoras/_060_autonomous_code_portals/autonomous_decorators.py,sha256=Y5zKrCK7ROY3_0RAIz6yf47Udsr0m3Co1f1isdybBcQ,4042
31
+ pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py,sha256=Nj4TPML94eS0WThoOfaqZhlPJu6RttvDg69VT86WPlg,9881
32
+ pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py,sha256=arfAuFBY4Dx9Zmf0b3x-axrd35QY2Kg_2jHJC8ek3p8,11977
33
33
  pythagoras/_070_protected_code_portals/__init__.py,sha256=TvGcJaz20Qqsmv8m2pA4duBtFn_CdCKfkSbOSFoJS8k,989
34
- pythagoras/_070_protected_code_portals/basic_pre_validators.py,sha256=6wrWKumBr2eyEhqpzZv8UlcX0WwUnAUzQ9D4cFyx1OE,2067
35
- pythagoras/_070_protected_code_portals/fn_arg_names_checker.py,sha256=6FjOUJmGgDCjkFcXf5Ook-E9eiEFguarY2qqzOyJj7A,1230
36
- pythagoras/_070_protected_code_portals/list_flattener.py,sha256=mlS1Eq2dwgHbNI55CPXKXzbRca49pDNRHTgCOmuo1LU,331
37
- pythagoras/_070_protected_code_portals/package_manager.py,sha256=QRHXGIatzx6NKPPC06CMijUmASl_mrPwikVBWG7Z03Y,1965
38
- pythagoras/_070_protected_code_portals/protected_decorators.py,sha256=5Y62rswuD7CD1duXd54_rhMb6-lLh7YvgdDgojP577g,1598
39
- pythagoras/_070_protected_code_portals/protected_portal_core_classes.py,sha256=ZTSD6m9HGTJDa9WuInb-0wqzP8NzaoIqWapg9XUXD-E,13583
40
- pythagoras/_070_protected_code_portals/system_utils.py,sha256=h4oiEQFAyFKzqvd0ywwAI0WDYKSuIh_vif86XQIXYwE,2360
41
- pythagoras/_070_protected_code_portals/validation_succesful_const.py,sha256=4NWGwN5Gu6kbbHTMkmJs8Ym0rFee_cIE2VlAPonmlJI,298
34
+ pythagoras/_070_protected_code_portals/basic_pre_validators.py,sha256=N5E1Gz_ULafZ8RQ1MvCQ6y29rfRVTQw7NZTqZ-pMOPo,6570
35
+ pythagoras/_070_protected_code_portals/fn_arg_names_checker.py,sha256=HZJVhdyX2xNw0e7S9Wyz0jDun-5xBuhM71Tw2zHbYXc,1603
36
+ pythagoras/_070_protected_code_portals/list_flattener.py,sha256=9V1Xj_y5nOCXS2V9mcBFX6UsyDdOR108SBqxbC-Ziyk,1604
37
+ pythagoras/_070_protected_code_portals/package_manager.py,sha256=KbvEGfeKQsWIz0UogVUHfW6enbBmnqo1OjJz1xMTL4o,5437
38
+ pythagoras/_070_protected_code_portals/protected_decorators.py,sha256=BrVcFiMHR4nD_dZgmlGkkMi-7ee3FqYFRCwl_nT35-E,4221
39
+ pythagoras/_070_protected_code_portals/protected_portal_core_classes.py,sha256=nclgUd02KySQ1ffFSvLWMbonGcbq0SpJy2x3jLw5sAU,23419
40
+ pythagoras/_070_protected_code_portals/system_utils.py,sha256=Uv111FaO33xAA9wZ2iwtW8Gf-FXJBP2ld1sMBmvsHdo,5124
41
+ pythagoras/_070_protected_code_portals/validation_succesful_const.py,sha256=DrM-Mf6dDLFJ7AmfzntD39Z23YMFfF6am78XU54AlnM,577
42
42
  pythagoras/_080_pure_code_portals/__init__.py,sha256=OI7836lLHT51SYdFfmWp4GdGRgcAkpLiAj-Zj_g2Gxo,1052
43
- pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=6AjtE9QdiG84e9WuJtsrvkuHTRC4MovC31xItGn2PD8,20455
44
- pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=WHZQzmyxgCpALHrqfeiOMrM6TDkZcv0Y2b756ez4Q2k,2279
45
- pythagoras/_080_pure_code_portals/recursion_pre_validator.py,sha256=n03ooGISJvuwNWteBN9t7CFFSLYAu86AHHFJVcywPqg,1865
43
+ pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=GniCEvJtEwYsqIxtz0QVh8wcgTHoisVuBKkIJKkz144,26381
44
+ pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=rmvtw_RpTbLjPTfy_2rdjfNSvV735hzTV_9q3drQKew,4036
45
+ pythagoras/_080_pure_code_portals/recursion_pre_validator.py,sha256=qrVBK0U6YM08tQ4rsTlKNkGbqmF3Wj2yGrnWLCAP7BY,3461
46
46
  pythagoras/_090_swarming_portals/__init__.py,sha256=TuA17PftTBudptAblNtBlD46BqUiitksOtf3y01QKm0,514
47
- pythagoras/_090_swarming_portals/output_suppressor.py,sha256=ENRtQtK_-7A94lAqtUQsIWrvtcgKniEpaWcZZZrpfQM,611
48
- pythagoras/_090_swarming_portals/swarming_portals.py,sha256=3d8sRniGdW_rKp2zKxdqoCvLA4Em1XW5xofhFtzDLf0,12696
49
- pythagoras/_100_top_level_API/__init__.py,sha256=s5LtwskY2nwkRPFKzP0PrCzQ1c9oScZO0kM9_bWLi3U,64
47
+ pythagoras/_090_swarming_portals/output_suppressor.py,sha256=IspRrfLt6pI9iuD8I1dfpnQLpRi5sO11pP5QvIGVoMo,1581
48
+ pythagoras/_090_swarming_portals/swarming_portals.py,sha256=aLHo8iFjEmd-3psFOkiYg9vCKApUD_Wv0-poxQEFu1U,19624
49
+ pythagoras/_100_top_level_API/__init__.py,sha256=Jt6VWVCBygqnwl7_-s-jhdYp6masO_SuM2xQP4a96tk,505
50
50
  pythagoras/_100_top_level_API/default_local_portal.py,sha256=SnykTpTXg1KuT1qwDnrAZ63lYshMy-0nNiUgoOVMxCs,339
51
51
  pythagoras/_100_top_level_API/top_level_API.py,sha256=S2NXW4bfL98o6Txn6NM0EeBb1nzwFtPSl-yWNevAQIE,906
52
- pythagoras/_800_signatures_and_converters/__init__.py,sha256=WAzpPe8fsh_w_7HhVxJZLBid7gxnW3pmPZW86fYnJjk,166
53
- pythagoras/_800_signatures_and_converters/base_16_32_convertors.py,sha256=ZjVtKjjjMgMgHUhM-1Q9qLYWCDKhllqq9z4YgKL0qCg,1236
54
- pythagoras/_800_signatures_and_converters/current_date_gmt_str.py,sha256=K-rGHyrREsyBdYMq7vWrv3FdAacepWQpvOfT_mrZqNM,268
55
- pythagoras/_800_signatures_and_converters/hash_signatures.py,sha256=AsUID_Z7yeF06Jmk8kKAFXIuxoF0hN0OwOS1T5nu7_k,989
56
- pythagoras/_800_signatures_and_converters/node_signature.py,sha256=pSZ4yB4aXNH6yhizQ6Z3m4uRcuDNkr_-lZ8024NbZ7w,592
57
- pythagoras/_800_signatures_and_converters/random_signatures.py,sha256=wXTyjATM8IwMXq2vHhoAq6T-yI7DcN72Svyt05EjFBo,323
52
+ pythagoras/_800_signatures_and_converters/__init__.py,sha256=bva3Tyy00hC3NVEGnxU_uITXkoMHUfdHUd7pndLks0M,915
53
+ pythagoras/_800_signatures_and_converters/base_16_32_convertors.py,sha256=-E67xY0zUUMyn-xeRpwz7-sZfFXaaiVFLKQf2OHgNw0,2146
54
+ pythagoras/_800_signatures_and_converters/current_date_gmt_str.py,sha256=jMBQaUj_33Yto415IxuiRrNoiuxbORZS-En7bPP1JZU,841
55
+ pythagoras/_800_signatures_and_converters/hash_signatures.py,sha256=-RDExpYwXCWXtjgIfS3xiCYAJxGuiFSZzJ4p2pAvdmc,2278
56
+ pythagoras/_800_signatures_and_converters/node_signature.py,sha256=W5Rg6q0jBRRJzHnnemt8mVapoy2jIswOEg9xIm4poXo,1090
57
+ pythagoras/_800_signatures_and_converters/random_signatures.py,sha256=IpZ7uwReCd-K9Yq1IZoubxn7kidnRfpB9-GBKXdqYdA,719
58
58
  pythagoras/_900_project_stats_collector/__init__.py,sha256=Eagt-BhPPtBGgpMywx2lkLDK1603Y9t_QBdtHKUHHFY,71
59
59
  pythagoras/_900_project_stats_collector/project_analyzer.py,sha256=uhycFKjUIXEpYcZYnak3yn4JFhchl-oZ7wt6spFxhoY,3574
60
60
  pythagoras/__init__.py,sha256=TMPtJdSi_WShCpJnsVVdO48Wcvs78GMbUi5gHc1eMLw,1233
61
- pythagoras/core/__init__.py,sha256=cXtQ-Vbm8TqzazvkFws5cV3AEEYbEKzNXYeuHeLGFK0,328
62
- pythagoras-0.24.4.dist-info/WHEEL,sha256=X16MKk8bp2DRsAuyteHJ-9qOjzmnY0x1aj0P1ftqqWA,78
63
- pythagoras-0.24.4.dist-info/METADATA,sha256=o7l1zf9TCe9tz4nhG5KtKVU_z4qI9QQV-h0IHSitI_g,7467
64
- pythagoras-0.24.4.dist-info/RECORD,,
61
+ pythagoras/core/__init__.py,sha256=yfamQZNt_7FL7vfxSoCTZq2ZL6rupp6qzcp9CHhTj3E,2674
62
+ pythagoras-0.24.7.dist-info/WHEEL,sha256=X16MKk8bp2DRsAuyteHJ-9qOjzmnY0x1aj0P1ftqqWA,78
63
+ pythagoras-0.24.7.dist-info/METADATA,sha256=7Vyfi5r-mo09_YTa7SKy11w9RyU_-38LXJggrJH7Dwg,7467
64
+ pythagoras-0.24.7.dist-info/RECORD,,