reflex/reflex/utils
Masen Furer a2243190ff
[ENG-4326] Async ComputedVar (#4711)
* WiP

* Save the var from get_var_name

* flatten StateManagerRedis.get_state algorithm

simplify fetching of states and avoid repeatedly fetching the same state

* Get all the states in a single redis round-trip

* update docstrings in StateManagerRedis

* Move computed var dep tracking to separate module

* Fix pre-commit issues

* ComputedVar.add_dependency: explicitly dependency declaration

Allow var dependencies to be added at runtime, for example, when defining a
ComponentState that depends on vars that cannot be known statically.

Fix more pyright issues.

* Fix/ignore more pyright issues from recent merge

* handle cleaning out _potentially_dirty_states on reload

* ignore accessed attributes missing on state class

these might be added dynamically later in which case we recompute the
dependency tracking dicts... if not, they'll blow up anyway at runtime.

* fix playwright tests, which insist on running an asyncio loop

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-01-31 16:33:30 -08:00
..
__init__.py [REF-99] Add first version of CLI for hosting service (#1810) 2023-10-21 13:09:56 -07:00
build.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
codespaces.py enable N rules for naming conventions (#4666) 2025-01-23 15:29:17 +01:00
compat.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
console.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
exceptions.py improve var base typing (#4718) 2025-01-31 13:12:33 -08:00
exec.py [ENG-4326] Async ComputedVar (#4711) 2025-01-31 16:33:30 -08:00
export.py reflex export environment should default to prod (#4673) 2025-01-22 11:11:47 -08:00
format.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
imports.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
lazy_loader.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
net.py More env var cleanup (#4248) 2024-11-05 12:25:13 -08:00
path_ops.py fix stuff with bun_path (#4688) 2025-01-27 12:37:00 -08:00
prerequisites.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
processes.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
pyi_generator.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
redir.py [GTM-836]Rework Init workflow (#4377) 2024-11-21 16:58:12 -08:00
registry.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
serializers.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
telemetry.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00
types.py add more type annotations through the code (#4401) 2025-01-29 01:12:47 +01:00