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.
- pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +31 -4
- pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +94 -14
- pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +133 -4
- pythagoras/_070_protected_code_portals/basic_pre_validators.py +130 -15
- pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +20 -18
- pythagoras/_070_protected_code_portals/list_flattener.py +45 -7
- pythagoras/_070_protected_code_portals/package_manager.py +99 -24
- pythagoras/_070_protected_code_portals/protected_decorators.py +59 -1
- pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +239 -4
- pythagoras/_070_protected_code_portals/system_utils.py +85 -12
- pythagoras/_070_protected_code_portals/validation_succesful_const.py +12 -7
- pythagoras/_080_pure_code_portals/pure_core_classes.py +178 -25
- pythagoras/_080_pure_code_portals/pure_decorator.py +37 -0
- pythagoras/_080_pure_code_portals/recursion_pre_validator.py +39 -0
- pythagoras/_090_swarming_portals/output_suppressor.py +32 -3
- pythagoras/_090_swarming_portals/swarming_portals.py +165 -19
- pythagoras/_100_top_level_API/__init__.py +11 -0
- pythagoras/_800_signatures_and_converters/__init__.py +17 -0
- pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +55 -20
- pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +20 -5
- pythagoras/_800_signatures_and_converters/hash_signatures.py +46 -10
- pythagoras/_800_signatures_and_converters/node_signature.py +27 -12
- pythagoras/_800_signatures_and_converters/random_signatures.py +14 -3
- pythagoras/core/__init__.py +54 -0
- {pythagoras-0.24.4.dist-info → pythagoras-0.24.7.dist-info}/METADATA +1 -1
- {pythagoras-0.24.4.dist-info → pythagoras-0.24.7.dist-info}/RECORD +27 -27
- {pythagoras-0.24.4.dist-info → pythagoras-0.24.7.dist-info}/WHEEL +0 -0
pythagoras/core/__init__.py
CHANGED
|
@@ -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 *
|
|
@@ -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=
|
|
31
|
-
pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py,sha256=
|
|
32
|
-
pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py,sha256=
|
|
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=
|
|
35
|
-
pythagoras/_070_protected_code_portals/fn_arg_names_checker.py,sha256=
|
|
36
|
-
pythagoras/_070_protected_code_portals/list_flattener.py,sha256=
|
|
37
|
-
pythagoras/_070_protected_code_portals/package_manager.py,sha256=
|
|
38
|
-
pythagoras/_070_protected_code_portals/protected_decorators.py,sha256=
|
|
39
|
-
pythagoras/_070_protected_code_portals/protected_portal_core_classes.py,sha256=
|
|
40
|
-
pythagoras/_070_protected_code_portals/system_utils.py,sha256=
|
|
41
|
-
pythagoras/_070_protected_code_portals/validation_succesful_const.py,sha256=
|
|
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=
|
|
44
|
-
pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=
|
|
45
|
-
pythagoras/_080_pure_code_portals/recursion_pre_validator.py,sha256=
|
|
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=
|
|
48
|
-
pythagoras/_090_swarming_portals/swarming_portals.py,sha256=
|
|
49
|
-
pythagoras/_100_top_level_API/__init__.py,sha256=
|
|
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=
|
|
53
|
-
pythagoras/_800_signatures_and_converters/base_16_32_convertors.py,sha256
|
|
54
|
-
pythagoras/_800_signatures_and_converters/current_date_gmt_str.py,sha256=
|
|
55
|
-
pythagoras/_800_signatures_and_converters/hash_signatures.py,sha256
|
|
56
|
-
pythagoras/_800_signatures_and_converters/node_signature.py,sha256=
|
|
57
|
-
pythagoras/_800_signatures_and_converters/random_signatures.py,sha256=
|
|
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=
|
|
62
|
-
pythagoras-0.24.
|
|
63
|
-
pythagoras-0.24.
|
|
64
|
-
pythagoras-0.24.
|
|
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,,
|
|
File without changes
|