Show HN: Reactive Signals for Python – inspired by Angular's reactivity model

Hey everyone, I built reaktiv, a small reactive signals library for Python, inspired by Angular’s reactivity model. It lets you define Signals, Computed Values, and Effects that automatically track dependencies and update efficiently. The main focus is async-first reactivity without external dependencies.

Here is an example code:

``` import asyncio from reaktiv import Signal, ComputeSignal, Effect

async def main(): count = Signal(0) doubled = ComputeSignal(lambda: count.get() * 2)

    async def log_count():
        print(f"Count: {count.get()}, Doubled: {doubled.get()}")
    Effect(log_count).schedule()
    count.set(5)  # Triggers: "Count: 5, Doubled: 10"
    await asyncio.sleep(0)  # Allow effects to process
asyncio.run(main()) ```

Comments URL: https://news.ycombinator.com/item?id=42880873

Points: 6

# Comments: 1

https://github.com/buiapp/reaktiv

Creato 5h | 30 gen 2025, 20:20:07


Accedi per aggiungere un commento

Altri post in questo gruppo

Launch HN: Karsa (YC W25) – Buy and save stablecoins internationally

Hey HN, weʼre Shahryar and Dale, the co-founders of Karsa (https://gokarsa.com). Karsa makes it easy for anyone in emerging markets to buy and save in stablecoins

30 gen 2025, 20:20:15 | Hacker news
Show HN: Iterm-Mcp – AI Terminal/REPL Control for iTerm2

Hi HN! Ever wish you could just point your AI assistant at your terminal and say 'what's wrong with this output?' That's why I built iterm-mcp. It lets MCP clients like Claude Desktop directly int

30 gen 2025, 20:20:13 | Hacker news
Cointelpro
30 gen 2025, 20:20:12 | Hacker news