This is a autopost bolg frinds we are trying to all latest sports,news,all new update provide for you
Thursday, January 30, 2025
Show HN: Reactive Signals for Python – inspired by Angular's reactivity model https://ift.tt/BXOsv8H
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()) ``` https://ift.tt/WDuQ05z January 31, 2025 at 12:26AM
Subscribe to:
Post Comments (Atom)
Show HN: tltv – Federation protocol for 24/7 TV channels https://ift.tt/KMVr6Ng
Show HN: tltv – Federation protocol for 24/7 TV channels I spent six years trying to build a tv channel server. rewrote it eight times. flas...
-
Show HN: A directory of 800 free APIs, no auth required Explore reliable free APIs for developers — ideal for web and software development, ...
-
Show HN: I built Dirac, Hash Anchored AST native coding agent, costs -64.8 pct Fully open source, a hard fork of cline. Full evals on the gi...
-
Show HN: I built a FOSS tool to run your Steam games in the Cloud I wanted to play my Steam games but my aging PC couldn’t keep up, so I bui...
No comments:
Post a Comment