A reactive state management library for Python with automatic dependency tracking, inspired by Angular Signals and SolidJS.
reaktiv is a reactive state management library for Python that provides Signals, Computed values, and Effects to manage application state with automatic dependency tracking. It solves the problem of manually updating dependent state by allowing developers to declare data relationships, ensuring updates propagate automatically when source data changes.
Python developers building applications with complex state logic, such as data processing pipelines, configuration management systems, real-time monitoring tools, or any project where manual state synchronization is error-prone.
Developers choose reaktiv for its Excel-like reactivity model, which guarantees data consistency, reduces bugs from forgotten updates, and offers fine-grained performance optimizations. Its type safety and async support make it a robust choice for modern Python applications.
Signals for Python - inspired by Angular Signals / SolidJS. Reactive Declarative State Management Library for Python - automatic dependency tracking and reactive updates for your application state.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically tracks dependencies between signals and computed values, ensuring data consistency without manual updates, as shown in the order calculation example where changing price or quantity recalculates totals automatically.
Only recomputes affected values when dependencies change, with lazy evaluation and memoization, optimizing performance for complex state graphs like independent data pipelines.
Includes Resource for async data loading with automatic cancellation and status management, preventing race conditions in data-fetching scenarios, as detailed in the async examples.
Integrates with static type checkers like mypy and pyright, providing autocompletion and early error detection, demonstrated with type-hinted signals and computed values.
Effects must be explicitly assigned to variables to prevent garbage collection, a common source of bugs that requires careful memory management, as warned in the README's critical notes.
Triggering updates with mutable objects like lists requires creating new instances instead of in-place modifications, adding boilerplate code and potential performance overhead.
Async effects are marked experimental and can lead to unpredictable behavior if signal values change during async execution, limiting reliability for production use without careful handling.