thds.core 1.42.20250715190546__py3-none-any.whl → 1.43.20250716213133__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 thds.core might be problematic. Click here for more details.

thds/core/fp.py ADDED
@@ -0,0 +1,20 @@
1
+ import typing as ty
2
+ from functools import partial
3
+
4
+ A = ty.TypeVar("A")
5
+ B = ty.TypeVar("B")
6
+ C = ty.TypeVar("C")
7
+
8
+
9
+ def _compose(f2: ty.Callable[[B], C], f1: ty.Callable[[A], B], arg: A) -> C:
10
+ return f2(f1(arg))
11
+
12
+
13
+ def compose(f2: ty.Callable[[B], C], f1: ty.Callable[[A], B]) -> ty.Callable[[A], C]:
14
+ """right-to-left"""
15
+ return partial(_compose, f2, f1)
16
+
17
+
18
+ def pipe(f1: ty.Callable[[A], B], f2: ty.Callable[[B], C]) -> ty.Callable[[A], C]:
19
+ """left-to-right"""
20
+ return partial(_compose, f2, f1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thds.core
3
- Version: 1.42.20250715190546
3
+ Version: 1.43.20250716213133
4
4
  Summary: Core utilities.
5
5
  Author-email: Trilliant Health <info@trillianthealth.com>
6
6
  License: MIT
@@ -12,6 +12,7 @@ thds/core/dump_stacks.py,sha256=srE4VlgU1kwcMFf12skenSdinx7Lu174MjV-gLNh6n4,1033
12
12
  thds/core/env.py,sha256=HkuyFmGpCgdQUB1r2GbpCqB3cs1lCsvp47Ghk1DHBo8,1083
13
13
  thds/core/exit_after.py,sha256=0lz63nz2NTiIdyBDYyRa9bQShxQKe7eISy8VhXeW4HU,3485
14
14
  thds/core/files.py,sha256=NJlPXj7BejKd_Pa06MOywVv_YapT4bVedfsJHrWX8nI,4579
15
+ thds/core/fp.py,sha256=S9hM7YmjbmaYbe4l5jSGnzf3HWhEaItmUOv6GMQpHo8,508
15
16
  thds/core/fretry.py,sha256=PKgOxCMjcF4zsFfXFvPXpomv5J6KU6llB1EaKukugig,6942
16
17
  thds/core/generators.py,sha256=rcdFpPj0NMJWSaSZTnBfTeZxTTORNB633Lng-BW1284,1939
17
18
  thds/core/git.py,sha256=cfdN1oXyfz7k7T2XaseTqL6Ng53B9lfKtzDLmFjojRs,2947
@@ -70,8 +71,8 @@ thds/core/sqlite/structured.py,sha256=SvZ67KcVcVdmpR52JSd52vMTW2ALUXmlHEeD-VrzWV
70
71
  thds/core/sqlite/types.py,sha256=oUkfoKRYNGDPZRk29s09rc9ha3SCk2SKr_K6WKebBFs,1308
71
72
  thds/core/sqlite/upsert.py,sha256=BmKK6fsGVedt43iY-Lp7dnAu8aJ1e9CYlPVEQR2pMj4,5827
72
73
  thds/core/sqlite/write.py,sha256=z0219vDkQDCnsV0WLvsj94keItr7H4j7Y_evbcoBrWU,3458
73
- thds_core-1.42.20250715190546.dist-info/METADATA,sha256=wKo5I1IlNk6JRRbDQtP2OjRhOA7hs7dv1hk3lTDejJc,2216
74
- thds_core-1.42.20250715190546.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- thds_core-1.42.20250715190546.dist-info/entry_points.txt,sha256=bOCOVhKZv7azF3FvaWX6uxE6yrjK6FcjqhtxXvLiFY8,161
76
- thds_core-1.42.20250715190546.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
77
- thds_core-1.42.20250715190546.dist-info/RECORD,,
74
+ thds_core-1.43.20250716213133.dist-info/METADATA,sha256=MANGxsaBe2kZzXTFxgNwenGINP4uRynKMY22zgL6EAY,2216
75
+ thds_core-1.43.20250716213133.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
76
+ thds_core-1.43.20250716213133.dist-info/entry_points.txt,sha256=bOCOVhKZv7azF3FvaWX6uxE6yrjK6FcjqhtxXvLiFY8,161
77
+ thds_core-1.43.20250716213133.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
78
+ thds_core-1.43.20250716213133.dist-info/RECORD,,