reflex 0.2.5__py3-none-any.whl → 0.2.6__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/components/datadisplay/datatable.py +2 -2
- reflex/components/forms/slider.py +3 -0
- reflex/model.py +3 -6
- reflex/vars.py +11 -2
- {reflex-0.2.5.dist-info → reflex-0.2.6.dist-info}/METADATA +2 -1
- {reflex-0.2.5.dist-info → reflex-0.2.6.dist-info}/RECORD +9 -9
- {reflex-0.2.5.dist-info → reflex-0.2.6.dist-info}/LICENSE +0 -0
- {reflex-0.2.5.dist-info → reflex-0.2.6.dist-info}/WHEEL +0 -0
- {reflex-0.2.5.dist-info → reflex-0.2.6.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Table components."""
|
|
2
2
|
|
|
3
|
-
from typing import Any, List
|
|
3
|
+
from typing import Any, Dict, List, Union
|
|
4
4
|
|
|
5
5
|
from reflex.components.component import Component
|
|
6
6
|
from reflex.components.tags import Tag
|
|
@@ -38,7 +38,7 @@ class DataTable(Gridjs):
|
|
|
38
38
|
resizable: Var[bool]
|
|
39
39
|
|
|
40
40
|
# Enable pagination.
|
|
41
|
-
pagination: Var[bool]
|
|
41
|
+
pagination: Var[Union[bool, Dict]]
|
|
42
42
|
|
|
43
43
|
@classmethod
|
|
44
44
|
def create(cls, *children, **props):
|
|
@@ -43,6 +43,9 @@ class Slider(ChakraComponent):
|
|
|
43
43
|
# The maximum value of the slider.
|
|
44
44
|
max_: Var[int]
|
|
45
45
|
|
|
46
|
+
# The step in which increments/decrements have to be made
|
|
47
|
+
step: Var[int]
|
|
48
|
+
|
|
46
49
|
# The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.
|
|
47
50
|
min_steps_between_thumbs: Var[int]
|
|
48
51
|
|
reflex/model.py
CHANGED
|
@@ -43,12 +43,9 @@ def get_engine(url: Optional[str] = None):
|
|
|
43
43
|
)
|
|
44
44
|
# Print the SQL queries if the log level is INFO or lower.
|
|
45
45
|
echo_db_query = os.environ.get("SQLALCHEMY_ECHO") == "True"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Needed for the admin dash.
|
|
50
|
-
connect_args={"check_same_thread": False},
|
|
51
|
-
)
|
|
46
|
+
# Needed for the admin dash on sqlite.
|
|
47
|
+
connect_args = {"check_same_thread": False} if url.startswith("sqlite") else {}
|
|
48
|
+
return sqlmodel.create_engine(url, echo=echo_db_query, connect_args=connect_args)
|
|
52
49
|
|
|
53
50
|
|
|
54
51
|
class Model(Base, sqlmodel.SQLModel):
|
reflex/vars.py
CHANGED
|
@@ -30,7 +30,7 @@ from pydantic.fields import ModelField
|
|
|
30
30
|
|
|
31
31
|
from reflex import constants
|
|
32
32
|
from reflex.base import Base
|
|
33
|
-
from reflex.utils import format, types
|
|
33
|
+
from reflex.utils import console, format, types
|
|
34
34
|
|
|
35
35
|
if TYPE_CHECKING:
|
|
36
36
|
from reflex.state import State
|
|
@@ -831,7 +831,16 @@ class BaseVar(Var, Base):
|
|
|
831
831
|
state: The state within which we add the setter function.
|
|
832
832
|
value: The value to set.
|
|
833
833
|
"""
|
|
834
|
-
|
|
834
|
+
if self.type_ in [int, float]:
|
|
835
|
+
try:
|
|
836
|
+
value = self.type_(value)
|
|
837
|
+
setattr(state, self.name, value)
|
|
838
|
+
except ValueError:
|
|
839
|
+
console.warn(
|
|
840
|
+
f"{self.name}: Failed conversion of {value} to '{self.type_.__name__}'. Value not set.",
|
|
841
|
+
)
|
|
842
|
+
else:
|
|
843
|
+
setattr(state, self.name, value)
|
|
835
844
|
|
|
836
845
|
setter.__qualname__ = self.get_setter_name()
|
|
837
846
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: reflex
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Web apps in pure Python.
|
|
5
5
|
Home-page: https://reflex.dev
|
|
6
6
|
License: Apache-2.0
|
|
@@ -28,6 +28,7 @@ Requires-Dist: platformdirs (>=3.10.0,<4.0.0)
|
|
|
28
28
|
Requires-Dist: plotly (>=5.13.0,<6.0.0)
|
|
29
29
|
Requires-Dist: psutil (>=5.9.4,<6.0.0)
|
|
30
30
|
Requires-Dist: pydantic (>=1.10.2,<2.0.0)
|
|
31
|
+
Requires-Dist: python-engineio (!=4.6.0)
|
|
31
32
|
Requires-Dist: python-multipart (>=0.0.5,<0.0.6)
|
|
32
33
|
Requires-Dist: python-socketio (>=5.7.0,<6.0.0)
|
|
33
34
|
Requires-Dist: redis (>=4.3.5,<5.0.0)
|
|
@@ -45,7 +45,7 @@ reflex/components/component.py,sha256=d5W7go7uEVWluP49OY2R9CaPX4tBRDFDheNGwXC1Sb
|
|
|
45
45
|
reflex/components/datadisplay/__init__.py,sha256=He8vj6DL88dSoPQzw3l_tp_C54PWsq3qai8V3d5pcy8,496
|
|
46
46
|
reflex/components/datadisplay/badge.py,sha256=Zp1fPtvm7qCSOB7OWuraptDtt_OVqixyz7i34IQcMH0,330
|
|
47
47
|
reflex/components/datadisplay/code.py,sha256=wFv8A71zKSKa9dy9xgv5vOQcMfinygffo5eTAoEHZu0,3495
|
|
48
|
-
reflex/components/datadisplay/datatable.py,sha256=
|
|
48
|
+
reflex/components/datadisplay/datatable.py,sha256=rWiEN55Bc1IzElc6WVuXzhnYrQILTc-iHsfV4mEmrtQ,3977
|
|
49
49
|
reflex/components/datadisplay/divider.py,sha256=ErCjdp7sQHLuRO9U9vPTQZEUlleSSS2oNQ6nMm8T1cc,533
|
|
50
50
|
reflex/components/datadisplay/keyboard_key.py,sha256=gqSX2VqnC8zzkmHnwvnXtnfNpuEsGeBmaLCdo7TgNqg,185
|
|
51
51
|
reflex/components/datadisplay/list.py,sha256=fLFKs48FryXjPSky_N9vyfnNfob6-zYs6UNVtXFOUug,1422
|
|
@@ -83,7 +83,7 @@ reflex/components/forms/pininput.py,sha256=FDzwR2--2MN9gPwUr0IaJEObEHqNl5cRftSnH
|
|
|
83
83
|
reflex/components/forms/radio.py,sha256=5R7HrXzGSvh2RDW1b5mcUBM1NOlMjQkWt9izH1NyblA,3029
|
|
84
84
|
reflex/components/forms/rangeslider.py,sha256=5UbPWKcsZAZoqy8URZfbD5GKdM1wCg1NuBdpo4SDLkU,4177
|
|
85
85
|
reflex/components/forms/select.py,sha256=XYBOMcLCP5rWWFq0QXjHr9jRWGhtTSWq7UcXdzhgKG8,3510
|
|
86
|
-
reflex/components/forms/slider.py,sha256=
|
|
86
|
+
reflex/components/forms/slider.py,sha256=gOCYtvSJ6XEw__xiikxDNgiXDqioAe6_o45PNsvpW6c,3198
|
|
87
87
|
reflex/components/forms/switch.py,sha256=RypVYfIIgEG1J01Rn-ZjsWi1YFQ3Wjgf816mgX-J8o8,1567
|
|
88
88
|
reflex/components/forms/textarea.py,sha256=KzohU2pFu-2NXjVrATAGhwRQyRFkRuYDu4WaR0jW-o4,2439
|
|
89
89
|
reflex/components/forms/upload.py,sha256=nRQF4IPVqZjwXtqcpQr2waMJ9hnKLlYcwa2_RYt8FEs,3272
|
|
@@ -154,7 +154,7 @@ reflex/event.py,sha256=AlSDMzW731WHZdzqvpjENhxC3qRiRlR2E5xD3jwprwE,13408
|
|
|
154
154
|
reflex/middleware/__init__.py,sha256=x7xTeDuc73Hjj43k1J63naC9x8vzFxl4sq7cCFBX7sk,111
|
|
155
155
|
reflex/middleware/hydrate_middleware.py,sha256=IBz_ay8Bb3rezBzyC3F7BLb6p50GS2RRCs5gL5V3ECA,1727
|
|
156
156
|
reflex/middleware/middleware.py,sha256=BJM_3GGLUi6oRf753vxRJueOUDm3eLC2pdY2hl1ez-4,1157
|
|
157
|
-
reflex/model.py,sha256=
|
|
157
|
+
reflex/model.py,sha256=LQT7FYK_Ak7AmlVga1OYNLSqg8t2TXzSTsQqn_nGUyw,9665
|
|
158
158
|
reflex/page.py,sha256=y3elKn6gIWhjlcTrqG28yILIGCWvaLj8Tk1RrWds97M,1832
|
|
159
159
|
reflex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
160
|
reflex/reflex.py,sha256=9f1AeTOsvHbNsQsMMgs6VvegJbAQQYH_LCY60Hci11Y,10277
|
|
@@ -174,9 +174,9 @@ reflex/utils/processes.py,sha256=H8XshR7xRSF7iSYchRmIKJF108DTLAqghY77YemqXaI,719
|
|
|
174
174
|
reflex/utils/telemetry.py,sha256=O7iidXpjOd_xpeqOfED4Vtjly55_yLGqeEm6nQSIjvY,2362
|
|
175
175
|
reflex/utils/types.py,sha256=7ezGbccoEzTpTDB15zskP4I2zu0qVU1T7oIdPnjtfTY,4889
|
|
176
176
|
reflex/utils/watch.py,sha256=1StctqX3jUwuZNDeikWI-363MpJX06PMQIJsHHwLSaE,2632
|
|
177
|
-
reflex/vars.py,sha256=
|
|
178
|
-
reflex-0.2.
|
|
179
|
-
reflex-0.2.
|
|
180
|
-
reflex-0.2.
|
|
181
|
-
reflex-0.2.
|
|
182
|
-
reflex-0.2.
|
|
177
|
+
reflex/vars.py,sha256=mKyMAsHxt9W4z40GjOsAOuuTnJRoJ2-_8qAuhLsdLu4,36238
|
|
178
|
+
reflex-0.2.6.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
179
|
+
reflex-0.2.6.dist-info/METADATA,sha256=Xn5KDIWyFKD5JTNFpFox4tMHLgiQXjdIz8hc6dTC03o,10126
|
|
180
|
+
reflex-0.2.6.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
181
|
+
reflex-0.2.6.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
182
|
+
reflex-0.2.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|