reflex 0.5.6a1__py3-none-any.whl → 0.5.6a2__py3-none-any.whl
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.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/__init__.py +7 -1
- reflex/__init__.pyi +3 -0
- reflex/components/core/foreach.py +3 -2
- reflex/components/core/upload.py +1 -1
- reflex/state.py +20 -3
- {reflex-0.5.6a1.dist-info → reflex-0.5.6a2.dist-info}/METADATA +1 -1
- {reflex-0.5.6a1.dist-info → reflex-0.5.6a2.dist-info}/RECORD +10 -10
- {reflex-0.5.6a1.dist-info → reflex-0.5.6a2.dist-info}/LICENSE +0 -0
- {reflex-0.5.6a1.dist-info → reflex-0.5.6a2.dist-info}/WHEEL +0 -0
- {reflex-0.5.6a1.dist-info → reflex-0.5.6a2.dist-info}/entry_points.txt +0 -0
reflex/__init__.py
CHANGED
|
@@ -84,12 +84,18 @@ In the example above, you will be able to do `rx.list`
|
|
|
84
84
|
|
|
85
85
|
from __future__ import annotations
|
|
86
86
|
|
|
87
|
-
from reflex.utils import
|
|
87
|
+
from reflex.utils import (
|
|
88
|
+
compat, # for side-effects
|
|
89
|
+
lazy_loader,
|
|
90
|
+
)
|
|
88
91
|
|
|
89
92
|
# import this here explicitly to avoid returning the page module since page attr has the
|
|
90
93
|
# same name as page module(page.py)
|
|
91
94
|
from .page import page as page
|
|
92
95
|
|
|
96
|
+
# Remove the `compat` name from the namespace, it was imported for side-effects only.
|
|
97
|
+
del compat
|
|
98
|
+
|
|
93
99
|
RADIX_THEMES_MAPPING: dict = {
|
|
94
100
|
"components.radix.themes.base": ["color_mode", "theme", "theme_panel"],
|
|
95
101
|
"components.radix.themes.color_mode": ["color_mode"],
|
reflex/__init__.pyi
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
5
5
|
|
|
6
|
+
from reflex.utils import compat
|
|
7
|
+
|
|
6
8
|
from . import admin as admin
|
|
7
9
|
from . import app as app
|
|
8
10
|
from . import base as base
|
|
@@ -190,6 +192,7 @@ from .utils.serializers import serializer as serializer
|
|
|
190
192
|
from .vars import Var as Var
|
|
191
193
|
from .vars import cached_var as cached_var
|
|
192
194
|
|
|
195
|
+
del compat
|
|
193
196
|
RADIX_THEMES_MAPPING: dict
|
|
194
197
|
RADIX_THEMES_COMPONENTS_MAPPING: dict
|
|
195
198
|
RADIX_THEMES_LAYOUT_MAPPING: dict
|
|
@@ -66,7 +66,7 @@ class Foreach(Component):
|
|
|
66
66
|
raise ForeachVarError(
|
|
67
67
|
f"Could not foreach over var `{iterable._var_full_name}` of type Any. "
|
|
68
68
|
"(If you are trying to foreach over a state var, add a type annotation to the var). "
|
|
69
|
-
"See https://reflex.dev/docs/library/
|
|
69
|
+
"See https://reflex.dev/docs/library/dynamic-rendering/foreach/"
|
|
70
70
|
)
|
|
71
71
|
|
|
72
72
|
if (
|
|
@@ -95,7 +95,8 @@ class Foreach(Component):
|
|
|
95
95
|
if len(params) == 0 or len(params) > 2:
|
|
96
96
|
raise ForeachRenderError(
|
|
97
97
|
"Expected 1 or 2 parameters in foreach render function, got "
|
|
98
|
-
f"{[p.name for p in params]}. See
|
|
98
|
+
f"{[p.name for p in params]}. See "
|
|
99
|
+
"https://reflex.dev/docs/library/dynamic-rendering/foreach/"
|
|
99
100
|
)
|
|
100
101
|
|
|
101
102
|
if len(params) >= 1:
|
reflex/components/core/upload.py
CHANGED
|
@@ -107,7 +107,7 @@ def cancel_upload(upload_id: str) -> EventSpec:
|
|
|
107
107
|
An event spec that cancels the upload when triggered.
|
|
108
108
|
"""
|
|
109
109
|
return call_script(
|
|
110
|
-
f"upload_controllers[{Var.create_safe(upload_id, _var_is_string=True)._var_name_unwrapped
|
|
110
|
+
f"upload_controllers[{Var.create_safe(upload_id, _var_is_string=True)._var_name_unwrapped}]?.abort()"
|
|
111
111
|
)
|
|
112
112
|
|
|
113
113
|
|
reflex/state.py
CHANGED
|
@@ -61,7 +61,6 @@ if TYPE_CHECKING:
|
|
|
61
61
|
|
|
62
62
|
Delta = Dict[str, Any]
|
|
63
63
|
var = computed_var
|
|
64
|
-
config = get_config()
|
|
65
64
|
|
|
66
65
|
|
|
67
66
|
# If the state is this large, it's considered a performance issue.
|
|
@@ -2319,6 +2318,24 @@ def _dill_reduce_state(pickler, obj):
|
|
|
2319
2318
|
dill.Pickler.dispatch[type](pickler, obj)
|
|
2320
2319
|
|
|
2321
2320
|
|
|
2321
|
+
def _default_lock_expiration() -> int:
|
|
2322
|
+
"""Get the default lock expiration time.
|
|
2323
|
+
|
|
2324
|
+
Returns:
|
|
2325
|
+
The default lock expiration time.
|
|
2326
|
+
"""
|
|
2327
|
+
return get_config().redis_lock_expiration
|
|
2328
|
+
|
|
2329
|
+
|
|
2330
|
+
def _default_token_expiration() -> int:
|
|
2331
|
+
"""Get the default token expiration time.
|
|
2332
|
+
|
|
2333
|
+
Returns:
|
|
2334
|
+
The default token expiration time.
|
|
2335
|
+
"""
|
|
2336
|
+
return get_config().redis_token_expiration
|
|
2337
|
+
|
|
2338
|
+
|
|
2322
2339
|
class StateManagerRedis(StateManager):
|
|
2323
2340
|
"""A state manager that stores states in redis."""
|
|
2324
2341
|
|
|
@@ -2326,10 +2343,10 @@ class StateManagerRedis(StateManager):
|
|
|
2326
2343
|
redis: Redis
|
|
2327
2344
|
|
|
2328
2345
|
# The token expiration time (s).
|
|
2329
|
-
token_expiration: int =
|
|
2346
|
+
token_expiration: int = pydantic.Field(default_factory=_default_token_expiration)
|
|
2330
2347
|
|
|
2331
2348
|
# The maximum time to hold a lock (ms).
|
|
2332
|
-
lock_expiration: int =
|
|
2349
|
+
lock_expiration: int = pydantic.Field(default_factory=_default_lock_expiration)
|
|
2333
2350
|
|
|
2334
2351
|
# The keyspace subscription string when redis is waiting for lock to be released
|
|
2335
2352
|
_redis_notify_keyspace_events: str = (
|
|
@@ -63,8 +63,8 @@ reflex/.templates/web/utils/helpers/paste.js,sha256=ef30HsR83jRzzvZnl8yV79yqFP8T
|
|
|
63
63
|
reflex/.templates/web/utils/helpers/range.js,sha256=FevdZzCVxjF57ullfjpcUpeOXRxh5v09YnBB0jPbrS4,1152
|
|
64
64
|
reflex/.templates/web/utils/helpers/throttle.js,sha256=qxeyaEojaTeX36FPGftzVWrzDsRQU4iqg3U9RJz9Vj4,566
|
|
65
65
|
reflex/.templates/web/utils/state.js,sha256=dAGKAnhloEE5ldQ2n21k95br9djexy-CscZNQG-Remc,25021
|
|
66
|
-
reflex/__init__.py,sha256=
|
|
67
|
-
reflex/__init__.pyi,sha256=
|
|
66
|
+
reflex/__init__.py,sha256=ODbR-WJ4-ugGhepPf34fUy2GZdkxo3TpZaca1tpD7kw,9728
|
|
67
|
+
reflex/__init__.pyi,sha256=brBPyevzsUhaSKKgJVkXmm8VmXy8umVIIBjjV4IwcTI,10751
|
|
68
68
|
reflex/__main__.py,sha256=6cVrGEyT3j3tEvlEVUatpaYfbB5EF3UVY-6vc_Z7-hw,108
|
|
69
69
|
reflex/admin.py,sha256=_3pkkauMiTGJJ0kwAEBnsUWAgZZ_1WNnCaaObbhpmUI,374
|
|
70
70
|
reflex/app.py,sha256=wzBA0yrRc4CTuPttTBHtcI-pVLxaEZH3vzYHtgvwu54,46985
|
|
@@ -254,13 +254,13 @@ reflex/components/core/colors.py,sha256=-hzVGLEq3TiqroqzMi_YzGBCPXMvkNsen3pS_NzI
|
|
|
254
254
|
reflex/components/core/cond.py,sha256=wLHkGlp47FXk_VlzXx4n8k8xcLleWQsiWgIoNyUpuBE,6369
|
|
255
255
|
reflex/components/core/debounce.py,sha256=KFyfnvnaevSWrj04Uehh2w8guV2VM9oGx_ApuhP8q9M,4660
|
|
256
256
|
reflex/components/core/debounce.pyi,sha256=DBRFYOemKi_YYZRzRef7iQ9CSrchhPkVLlNGLDXdwUc,4038
|
|
257
|
-
reflex/components/core/foreach.py,sha256=
|
|
257
|
+
reflex/components/core/foreach.py,sha256=iTJMVHTUsWZzPN1xVT4CBsRHzDKv9bfLbUQkZM9tPV4,4823
|
|
258
258
|
reflex/components/core/html.py,sha256=iSeKFcld5m4zoXOGq0QEaKKtgTUUVLrIEVsP3cyYCxE,1305
|
|
259
259
|
reflex/components/core/html.pyi,sha256=184TSzJ6NnxJuLBZWI4VSiWH_9Orc3zEHlIcu539Otw,6274
|
|
260
260
|
reflex/components/core/layout/__init__.py,sha256=znldZaj_NGt8qCZDG70GMwjMTskcvCf_2N_EjCAHwdc,30
|
|
261
261
|
reflex/components/core/match.py,sha256=y7sBAwTJPLsfjNo6fmPykRaKUyuMa8orG6lwOvRt68c,9558
|
|
262
262
|
reflex/components/core/responsive.py,sha256=ACZdtJ4a4F8B3dm1k8h6J2_UJx0Z5LDB7XHQ2ty4wAc,1911
|
|
263
|
-
reflex/components/core/upload.py,sha256=
|
|
263
|
+
reflex/components/core/upload.py,sha256=nTXUE_4of_NeP5ghe6kysrQz2EJdCVJkXAwG0XKIEQU,10220
|
|
264
264
|
reflex/components/core/upload.pyi,sha256=tFo0VYlQ2eEL-QhQrAKiTSD-a3GwcRAs2XMzfPtYT6A,16582
|
|
265
265
|
reflex/components/datadisplay/__init__.py,sha256=Uxq0V74orISXh6woTNQXgOUrKMSf0bi6Aytsh7G59yw,471
|
|
266
266
|
reflex/components/datadisplay/__init__.pyi,sha256=qBAk9Dsp7woSrOChcQ1YsXdGNYuJv-jCZpKSsEwMiIQ,653
|
|
@@ -515,7 +515,7 @@ reflex/model.py,sha256=f9F3J3JZX_NmUCU5mN4Lh7afclq9fikPUB1K2FmNlhU,13545
|
|
|
515
515
|
reflex/page.py,sha256=NPT0xMownZGTiYiRtrUJnvAe_4oEvlzEJEkG-vrGhqI,2077
|
|
516
516
|
reflex/reflex.py,sha256=1wJX6casYE_sAc1JCo4vng9gsyAeiYsG2Yw7itk5Abs,17874
|
|
517
517
|
reflex/route.py,sha256=WZS7stKgO94nekFFYHaOqNgN3zZGpJb3YpGF4ViTHmw,4198
|
|
518
|
-
reflex/state.py,sha256=
|
|
518
|
+
reflex/state.py,sha256=U4_vbalL6_oLFxFjpBojipXPb6OX5iTKAziOXAMn-ZE,110504
|
|
519
519
|
reflex/style.py,sha256=sLeIKBKUpZV1q1QwexVyckqFphjoxsPqCstVQf-D0Ak,11703
|
|
520
520
|
reflex/testing.py,sha256=S2fE4rFPart_sBDw0P0YFyhTRS__bErwEYdZ4r9OSXo,33175
|
|
521
521
|
reflex/utils/__init__.py,sha256=y-AHKiRQAhk2oAkvn7W8cRVTZVK625ff8tTwvZtO7S4,24
|
|
@@ -539,8 +539,8 @@ reflex/utils/types.py,sha256=A8JepoRbONeo3cRIiLd08yUAo_To34UvU-t_S2P3UBA,17491
|
|
|
539
539
|
reflex/utils/watch.py,sha256=ukPT3YrvqsXYN6BInWiO_RPry5osSch9lOomQhxDyk0,2685
|
|
540
540
|
reflex/vars.py,sha256=CNNEAa0VHvx03FIP2YPJqXb8lGP0OjC_EjQl73x4v0A,77066
|
|
541
541
|
reflex/vars.pyi,sha256=8jzIgkRVcYY0MMZ6Ol9EUhw8dtaxCzGRsnxWxZAGc1U,6477
|
|
542
|
-
reflex-0.5.
|
|
543
|
-
reflex-0.5.
|
|
544
|
-
reflex-0.5.
|
|
545
|
-
reflex-0.5.
|
|
546
|
-
reflex-0.5.
|
|
542
|
+
reflex-0.5.6a2.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
543
|
+
reflex-0.5.6a2.dist-info/METADATA,sha256=362BHgYIgSqjrUWc5fG_kKJR978w8acrEGZ095_6LwA,12099
|
|
544
|
+
reflex-0.5.6a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
545
|
+
reflex-0.5.6a2.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
546
|
+
reflex-0.5.6a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|