hulista 0.1.0__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.
- hulista-0.1.0/.gitignore +31 -0
- hulista-0.1.0/PKG-INFO +122 -0
- hulista-0.1.0/README.md +91 -0
- hulista-0.1.0/asyncio_actors/__init__.py +46 -0
- hulista-0.1.0/asyncio_actors/actor.py +411 -0
- hulista-0.1.0/asyncio_actors/actor.pyi +98 -0
- hulista-0.1.0/asyncio_actors/bridge.py +73 -0
- hulista-0.1.0/asyncio_actors/circuit_breaker.py +128 -0
- hulista-0.1.0/asyncio_actors/dispatch_actor.py +374 -0
- hulista-0.1.0/asyncio_actors/inbox.py +196 -0
- hulista-0.1.0/asyncio_actors/py.typed +0 -0
- hulista-0.1.0/asyncio_actors/supervision.py +38 -0
- hulista-0.1.0/asyncio_actors/supervisor.py +218 -0
- hulista-0.1.0/asyncio_actors/system.py +156 -0
- hulista-0.1.0/fp_combinators/__init__.py +53 -0
- hulista-0.1.0/fp_combinators/__init__.pyi +134 -0
- hulista-0.1.0/fp_combinators/_core.py +207 -0
- hulista-0.1.0/fp_combinators/_result.py +331 -0
- hulista-0.1.0/fp_combinators/py.typed +0 -0
- hulista-0.1.0/hulista/__init__.py +65 -0
- hulista-0.1.0/hulista/py.typed +0 -0
- hulista-0.1.0/live_dispatch/__init__.py +14 -0
- hulista-0.1.0/live_dispatch/_combinations.py +262 -0
- hulista-0.1.0/live_dispatch/_dispatcher.py +832 -0
- hulista-0.1.0/live_dispatch/_predicate.py +20 -0
- hulista-0.1.0/live_dispatch/_sealed_glue.py +75 -0
- hulista-0.1.0/live_dispatch/_versioned.py +56 -0
- hulista-0.1.0/live_dispatch/py.typed +0 -0
- hulista-0.1.0/persistent_collections/__init__.py +23 -0
- hulista-0.1.0/persistent_collections/_diff.py +259 -0
- hulista-0.1.0/persistent_collections/_freeze.py +58 -0
- hulista-0.1.0/persistent_collections/_hamt.py +379 -0
- hulista-0.1.0/persistent_collections/_paths.py +104 -0
- hulista-0.1.0/persistent_collections/persistent_map.py +235 -0
- hulista-0.1.0/persistent_collections/persistent_map.pyi +75 -0
- hulista-0.1.0/persistent_collections/persistent_set.py +181 -0
- hulista-0.1.0/persistent_collections/persistent_vector.py +277 -0
- hulista-0.1.0/persistent_collections/persistent_vector.pyi +63 -0
- hulista-0.1.0/persistent_collections/py.typed +0 -0
- hulista-0.1.0/pyproject.toml +68 -0
- hulista-0.1.0/sealed_typing/__init__.py +16 -0
- hulista-0.1.0/sealed_typing/_sealed.py +338 -0
- hulista-0.1.0/sealed_typing/py.typed +0 -0
- hulista-0.1.0/taskgroup_collect/__init__.py +25 -0
- hulista-0.1.0/taskgroup_collect/_collect.py +68 -0
- hulista-0.1.0/taskgroup_collect/_collector.py +293 -0
- hulista-0.1.0/taskgroup_collect/_collector.pyi +32 -0
- hulista-0.1.0/taskgroup_collect/_interop.py +107 -0
- hulista-0.1.0/taskgroup_collect/_outcome.py +64 -0
- hulista-0.1.0/taskgroup_collect/py.typed +1 -0
- hulista-0.1.0/tests/__init__.py +0 -0
- hulista-0.1.0/tests/conftest.py +51 -0
- hulista-0.1.0/tests/test_umbrella.py +279 -0
- hulista-0.1.0/with_update/__init__.py +4 -0
- hulista-0.1.0/with_update/_core.py +309 -0
- hulista-0.1.0/with_update/py.typed +0 -0
hulista-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
*.egg
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
site/
|
|
9
|
+
.eggs/
|
|
10
|
+
*.so
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
.tox/
|
|
16
|
+
htmlcov/
|
|
17
|
+
.coverage
|
|
18
|
+
.coverage.*
|
|
19
|
+
.benchmarks/
|
|
20
|
+
coverage.json
|
|
21
|
+
benchmark-results.json
|
|
22
|
+
*.cover
|
|
23
|
+
.pymon
|
|
24
|
+
.cultivar/
|
|
25
|
+
|
|
26
|
+
# Local planning and agent orchestration artifacts
|
|
27
|
+
IMPLEMENTATION_PLAN.md
|
|
28
|
+
PROMPT.md
|
|
29
|
+
.yarli/
|
|
30
|
+
AGENTS.md
|
|
31
|
+
agents.md
|
hulista-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hulista
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Functional, immutable, concurrent Python — all batteries included
|
|
5
|
+
Project-URL: Homepage, https://github.com/rahulrajaram/hulista
|
|
6
|
+
Project-URL: Documentation, https://rahulrajaram.github.io/hulista/
|
|
7
|
+
Project-URL: Repository, https://github.com/rahulrajaram/hulista
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/rahulrajaram/hulista/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/rahulrajaram/hulista/blob/master/CHANGELOG.md
|
|
10
|
+
Author-email: Rahul Rajaram <rahulrajaram2005@gmail.com>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
Keywords: asyncio,concurrency,functional,immutable,typing
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: build>=1.3; extra == 'dev'
|
|
24
|
+
Requires-Dist: mypy>=1.19; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=9.0; extra == 'dev'
|
|
28
|
+
Provides-Extra: pydantic
|
|
29
|
+
Requires-Dist: pydantic>=2.0; extra == 'pydantic'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# hulista
|
|
33
|
+
|
|
34
|
+
Functional, immutable, concurrent Python — all batteries included.
|
|
35
|
+
|
|
36
|
+
`hulista` is the single published distribution for the full hulista toolkit. One install gives you immutable data structures, sealed typing, runtime dispatch, actor-style concurrency, collect-all task groups, functional combinators, and record-update ergonomics.
|
|
37
|
+
|
|
38
|
+
Documentation: <https://rahulrajaram.github.io/hulista/>
|
|
39
|
+
|
|
40
|
+
## Why install the umbrella package?
|
|
41
|
+
|
|
42
|
+
Install `hulista` when you want a coherent batteries-included stack instead of picking packages one by one. It is especially useful for:
|
|
43
|
+
|
|
44
|
+
- event-driven or agent-style systems that combine immutable state with async orchestration
|
|
45
|
+
- teams that want one dependency and one docs entry point
|
|
46
|
+
- experimentation across the full package family before narrowing to individual imports
|
|
47
|
+
|
|
48
|
+
The `hulista` wheel bundles the toolkit's runtime modules directly:
|
|
49
|
+
|
|
50
|
+
| Package | Import | Description |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| asyncio-actors | `asyncio_actors` | OTP-inspired actor primitives for asyncio |
|
|
53
|
+
| fp-combinators | `fp_combinators` | Lightweight functional programming combinators |
|
|
54
|
+
| live-dispatch | `live_dispatch` | Runtime-extensible multiple dispatch |
|
|
55
|
+
| persistent-collections | `persistent_collections` | Immutable collections with structural sharing |
|
|
56
|
+
| sealed-typing | `sealed_typing` | Sealed classes for exhaustive matching |
|
|
57
|
+
| taskgroup-collect | `taskgroup_collect` | TaskGroup that collects all errors |
|
|
58
|
+
| with-update | `with_update` | Record update syntax for frozen dataclasses |
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
Install the full toolkit:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install hulista
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The bundled modules remain importable directly if you prefer focused imports:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from persistent_collections import PersistentMap
|
|
72
|
+
from fp_combinators import pipe
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick start
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import hulista
|
|
79
|
+
|
|
80
|
+
# Persistent immutable map
|
|
81
|
+
m = hulista.PersistentMap().set("x", 1).set("y", 2)
|
|
82
|
+
|
|
83
|
+
# FP pipe
|
|
84
|
+
result = hulista.pipe(m, lambda pm: sum(pm.values()))
|
|
85
|
+
|
|
86
|
+
# Result type
|
|
87
|
+
ok = hulista.Ok(42)
|
|
88
|
+
err = hulista.Err("oops")
|
|
89
|
+
|
|
90
|
+
# Sealed hierarchy
|
|
91
|
+
@hulista.sealed
|
|
92
|
+
class Event: pass
|
|
93
|
+
|
|
94
|
+
class Click(Event): pass
|
|
95
|
+
class KeyPress(Event): pass
|
|
96
|
+
|
|
97
|
+
subs = hulista.sealed_subclasses(Event) # {Click, KeyPress}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## What you get
|
|
101
|
+
|
|
102
|
+
- `PersistentMap` / `PersistentVector` for immutable application state with structural sharing
|
|
103
|
+
- `pipe`, `async_pipe`, `Ok`, and `Err` for dataflow and typed error handling
|
|
104
|
+
- `ActorSystem` for supervised async workers and message passing
|
|
105
|
+
- `Dispatcher` for runtime-extensible type or predicate dispatch
|
|
106
|
+
- `sealed` for exhaustiveness-friendly closed hierarchies
|
|
107
|
+
- `CollectorTaskGroup` for collect-all structured concurrency
|
|
108
|
+
- `updatable` and `with_update` for record-update syntax on frozen models
|
|
109
|
+
|
|
110
|
+
## Source layout
|
|
111
|
+
|
|
112
|
+
Each package lives in the monorepo with its own README and tests, but the public PyPI release is `hulista`:
|
|
113
|
+
|
|
114
|
+
- [`asyncio-actors/`](https://github.com/rahulrajaram/hulista/tree/master/asyncio-actors)
|
|
115
|
+
- [`fp-combinators/`](https://github.com/rahulrajaram/hulista/tree/master/fp-combinators)
|
|
116
|
+
- [`live-dispatch/`](https://github.com/rahulrajaram/hulista/tree/master/live-dispatch)
|
|
117
|
+
- [`persistent-collections/`](https://github.com/rahulrajaram/hulista/tree/master/persistent-collections)
|
|
118
|
+
- [`sealed-typing/`](https://github.com/rahulrajaram/hulista/tree/master/sealed-typing)
|
|
119
|
+
- [`taskgroup-collect/`](https://github.com/rahulrajaram/hulista/tree/master/taskgroup-collect)
|
|
120
|
+
- [`with-update/`](https://github.com/rahulrajaram/hulista/tree/master/with-update)
|
|
121
|
+
|
|
122
|
+
## Requires Python 3.11+
|
hulista-0.1.0/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# hulista
|
|
2
|
+
|
|
3
|
+
Functional, immutable, concurrent Python — all batteries included.
|
|
4
|
+
|
|
5
|
+
`hulista` is the single published distribution for the full hulista toolkit. One install gives you immutable data structures, sealed typing, runtime dispatch, actor-style concurrency, collect-all task groups, functional combinators, and record-update ergonomics.
|
|
6
|
+
|
|
7
|
+
Documentation: <https://rahulrajaram.github.io/hulista/>
|
|
8
|
+
|
|
9
|
+
## Why install the umbrella package?
|
|
10
|
+
|
|
11
|
+
Install `hulista` when you want a coherent batteries-included stack instead of picking packages one by one. It is especially useful for:
|
|
12
|
+
|
|
13
|
+
- event-driven or agent-style systems that combine immutable state with async orchestration
|
|
14
|
+
- teams that want one dependency and one docs entry point
|
|
15
|
+
- experimentation across the full package family before narrowing to individual imports
|
|
16
|
+
|
|
17
|
+
The `hulista` wheel bundles the toolkit's runtime modules directly:
|
|
18
|
+
|
|
19
|
+
| Package | Import | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| asyncio-actors | `asyncio_actors` | OTP-inspired actor primitives for asyncio |
|
|
22
|
+
| fp-combinators | `fp_combinators` | Lightweight functional programming combinators |
|
|
23
|
+
| live-dispatch | `live_dispatch` | Runtime-extensible multiple dispatch |
|
|
24
|
+
| persistent-collections | `persistent_collections` | Immutable collections with structural sharing |
|
|
25
|
+
| sealed-typing | `sealed_typing` | Sealed classes for exhaustive matching |
|
|
26
|
+
| taskgroup-collect | `taskgroup_collect` | TaskGroup that collects all errors |
|
|
27
|
+
| with-update | `with_update` | Record update syntax for frozen dataclasses |
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
Install the full toolkit:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install hulista
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The bundled modules remain importable directly if you prefer focused imports:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from persistent_collections import PersistentMap
|
|
41
|
+
from fp_combinators import pipe
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick start
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
import hulista
|
|
48
|
+
|
|
49
|
+
# Persistent immutable map
|
|
50
|
+
m = hulista.PersistentMap().set("x", 1).set("y", 2)
|
|
51
|
+
|
|
52
|
+
# FP pipe
|
|
53
|
+
result = hulista.pipe(m, lambda pm: sum(pm.values()))
|
|
54
|
+
|
|
55
|
+
# Result type
|
|
56
|
+
ok = hulista.Ok(42)
|
|
57
|
+
err = hulista.Err("oops")
|
|
58
|
+
|
|
59
|
+
# Sealed hierarchy
|
|
60
|
+
@hulista.sealed
|
|
61
|
+
class Event: pass
|
|
62
|
+
|
|
63
|
+
class Click(Event): pass
|
|
64
|
+
class KeyPress(Event): pass
|
|
65
|
+
|
|
66
|
+
subs = hulista.sealed_subclasses(Event) # {Click, KeyPress}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## What you get
|
|
70
|
+
|
|
71
|
+
- `PersistentMap` / `PersistentVector` for immutable application state with structural sharing
|
|
72
|
+
- `pipe`, `async_pipe`, `Ok`, and `Err` for dataflow and typed error handling
|
|
73
|
+
- `ActorSystem` for supervised async workers and message passing
|
|
74
|
+
- `Dispatcher` for runtime-extensible type or predicate dispatch
|
|
75
|
+
- `sealed` for exhaustiveness-friendly closed hierarchies
|
|
76
|
+
- `CollectorTaskGroup` for collect-all structured concurrency
|
|
77
|
+
- `updatable` and `with_update` for record-update syntax on frozen models
|
|
78
|
+
|
|
79
|
+
## Source layout
|
|
80
|
+
|
|
81
|
+
Each package lives in the monorepo with its own README and tests, but the public PyPI release is `hulista`:
|
|
82
|
+
|
|
83
|
+
- [`asyncio-actors/`](https://github.com/rahulrajaram/hulista/tree/master/asyncio-actors)
|
|
84
|
+
- [`fp-combinators/`](https://github.com/rahulrajaram/hulista/tree/master/fp-combinators)
|
|
85
|
+
- [`live-dispatch/`](https://github.com/rahulrajaram/hulista/tree/master/live-dispatch)
|
|
86
|
+
- [`persistent-collections/`](https://github.com/rahulrajaram/hulista/tree/master/persistent-collections)
|
|
87
|
+
- [`sealed-typing/`](https://github.com/rahulrajaram/hulista/tree/master/sealed-typing)
|
|
88
|
+
- [`taskgroup-collect/`](https://github.com/rahulrajaram/hulista/tree/master/taskgroup-collect)
|
|
89
|
+
- [`with-update/`](https://github.com/rahulrajaram/hulista/tree/master/with-update)
|
|
90
|
+
|
|
91
|
+
## Requires Python 3.11+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""OTP-inspired actor primitives for Python asyncio.
|
|
2
|
+
|
|
3
|
+
Provides:
|
|
4
|
+
- :class:`Actor` / :class:`ActorRef` — base actor with inbox and lifecycle hooks
|
|
5
|
+
- :class:`ActorSystem` — spawn and supervise actors with automatic restarts
|
|
6
|
+
- :class:`Inbox` / :class:`OverflowPolicy` / :class:`InboxFull` — bounded queue
|
|
7
|
+
- :class:`SupervisionStrategy` / :class:`RestartPolicy` — supervision configuration
|
|
8
|
+
- :class:`PersistentBridge` — async-sync bridge for monitor-thread patterns
|
|
9
|
+
- :class:`Supervisor` / :class:`ChildSpec` — hierarchical supervision
|
|
10
|
+
- :class:`CircuitBreaker` / :class:`CircuitState` — failure management
|
|
11
|
+
- :class:`DispatchActor` — actor with type-based message dispatch
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from asyncio_actors.actor import Actor, ActorRef, Envelope
|
|
15
|
+
from asyncio_actors.system import ActorSystem
|
|
16
|
+
from asyncio_actors.inbox import Inbox, OverflowPolicy, InboxFull
|
|
17
|
+
from asyncio_actors.supervision import SupervisionStrategy, RestartPolicy
|
|
18
|
+
from asyncio_actors.bridge import PersistentBridge
|
|
19
|
+
from asyncio_actors.supervisor import (
|
|
20
|
+
Supervisor, ChildSpec, SupervisorStrategy, RestartType,
|
|
21
|
+
)
|
|
22
|
+
from asyncio_actors.circuit_breaker import CircuitBreaker, CircuitState, CircuitOpenError
|
|
23
|
+
from asyncio_actors.dispatch_actor import DispatchActor
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"Actor",
|
|
27
|
+
"ActorRef",
|
|
28
|
+
"ActorSystem",
|
|
29
|
+
"Envelope",
|
|
30
|
+
"Inbox",
|
|
31
|
+
"OverflowPolicy",
|
|
32
|
+
"InboxFull",
|
|
33
|
+
"SupervisionStrategy",
|
|
34
|
+
"RestartPolicy",
|
|
35
|
+
"PersistentBridge",
|
|
36
|
+
"Supervisor",
|
|
37
|
+
"ChildSpec",
|
|
38
|
+
"SupervisorStrategy",
|
|
39
|
+
"RestartType",
|
|
40
|
+
"CircuitBreaker",
|
|
41
|
+
"CircuitState",
|
|
42
|
+
"CircuitOpenError",
|
|
43
|
+
"DispatchActor",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
__version__ = "0.1.0"
|