reflex 0.7.9a2__py3-none-any.whl → 0.7.10a1__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/app.py +12 -4
- reflex/components/component.py +38 -11
- reflex/components/core/upload.py +48 -16
- reflex/components/core/upload.pyi +7 -0
- reflex/components/react_player/audio.pyi +0 -4
- reflex/components/react_player/react_player.py +21 -7
- reflex/components/react_player/react_player.pyi +0 -4
- reflex/components/react_player/video.pyi +0 -4
- reflex/config.py +2 -2
- reflex/constants/__init__.py +2 -0
- reflex/constants/base.py +1 -1
- reflex/constants/config.py +7 -0
- reflex/constants/installer.py +19 -5
- reflex/event.py +24 -0
- reflex/istate/manager.py +858 -0
- reflex/istate/proxy.py +726 -2
- reflex/reflex.py +15 -9
- reflex/state.py +91 -1622
- reflex/testing.py +20 -13
- reflex/utils/prerequisites.py +33 -40
- reflex/utils/pyi_generator.py +5 -4
- reflex/utils/redir.py +7 -0
- reflex/utils/serializers.py +14 -0
- reflex/vars/base.py +13 -1
- reflex/vars/number.py +16 -8
- reflex/vars/sequence.py +2 -1
- {reflex-0.7.9a2.dist-info → reflex-0.7.10a1.dist-info}/METADATA +2 -2
- {reflex-0.7.9a2.dist-info → reflex-0.7.10a1.dist-info}/RECORD +31 -30
- {reflex-0.7.9a2.dist-info → reflex-0.7.10a1.dist-info}/WHEEL +0 -0
- {reflex-0.7.9a2.dist-info → reflex-0.7.10a1.dist-info}/entry_points.txt +0 -0
- {reflex-0.7.9a2.dist-info → reflex-0.7.10a1.dist-info}/licenses/LICENSE +0 -0
reflex/reflex.py
CHANGED
|
@@ -86,7 +86,7 @@ def _init(
|
|
|
86
86
|
prerequisites.initialize_gitignore()
|
|
87
87
|
|
|
88
88
|
# Initialize the requirements.txt.
|
|
89
|
-
|
|
89
|
+
needs_user_manual_update = prerequisites.initialize_requirements_txt()
|
|
90
90
|
|
|
91
91
|
template_msg = f" using the {template} template" if template else ""
|
|
92
92
|
# Finish initializing the app.
|
|
@@ -94,7 +94,7 @@ def _init(
|
|
|
94
94
|
f"Initialized {app_name}{template_msg}."
|
|
95
95
|
+ (
|
|
96
96
|
f" Make sure to add {constants.RequirementsTxt.DEFAULTS_STUB + constants.Reflex.VERSION} to your requirements.txt or pyproject.toml file."
|
|
97
|
-
if
|
|
97
|
+
if needs_user_manual_update
|
|
98
98
|
else ""
|
|
99
99
|
)
|
|
100
100
|
)
|
|
@@ -151,8 +151,10 @@ def _run(
|
|
|
151
151
|
if not frontend and backend:
|
|
152
152
|
_skip_compile()
|
|
153
153
|
|
|
154
|
+
prerequisites.assert_in_reflex_dir()
|
|
155
|
+
|
|
154
156
|
# Check that the app is initialized.
|
|
155
|
-
if prerequisites.needs_reinit(
|
|
157
|
+
if frontend and prerequisites.needs_reinit():
|
|
156
158
|
_init(name=config.app_name)
|
|
157
159
|
|
|
158
160
|
# Delete the states folder if it exists.
|
|
@@ -403,19 +405,21 @@ def export(
|
|
|
403
405
|
|
|
404
406
|
environment.REFLEX_COMPILE_CONTEXT.set(constants.CompileContext.EXPORT)
|
|
405
407
|
|
|
406
|
-
|
|
408
|
+
should_frontend_run, should_backend_run = prerequisites.check_running_mode(
|
|
407
409
|
frontend_only, backend_only
|
|
408
410
|
)
|
|
409
411
|
|
|
410
412
|
config = get_config()
|
|
411
413
|
|
|
412
|
-
|
|
414
|
+
prerequisites.assert_in_reflex_dir()
|
|
415
|
+
|
|
416
|
+
if should_frontend_run and prerequisites.needs_reinit():
|
|
413
417
|
_init(name=config.app_name)
|
|
414
418
|
|
|
415
419
|
export_utils.export(
|
|
416
420
|
zipping=zip,
|
|
417
|
-
frontend=
|
|
418
|
-
backend=
|
|
421
|
+
frontend=should_frontend_run,
|
|
422
|
+
backend=should_backend_run,
|
|
419
423
|
zip_dest_dir=zip_dest_dir,
|
|
420
424
|
upload_db_file=upload_db_file,
|
|
421
425
|
env=constants.Env.DEV if env == constants.Env.DEV else constants.Env.PROD,
|
|
@@ -631,8 +635,10 @@ def deploy(
|
|
|
631
635
|
if interactive:
|
|
632
636
|
dependency.check_requirements()
|
|
633
637
|
|
|
638
|
+
prerequisites.assert_in_reflex_dir()
|
|
639
|
+
|
|
634
640
|
# Check if we are set up.
|
|
635
|
-
if prerequisites.needs_reinit(
|
|
641
|
+
if prerequisites.needs_reinit():
|
|
636
642
|
_init(name=config.app_name)
|
|
637
643
|
prerequisites.check_latest_package_version(constants.ReflexHostingCLI.MODULE_NAME)
|
|
638
644
|
|
|
@@ -712,7 +718,7 @@ def _convert_reflex_loglevel_to_reflex_cli_loglevel(
|
|
|
712
718
|
return HostingLogLevel.INFO
|
|
713
719
|
|
|
714
720
|
|
|
715
|
-
if find_spec("typer"):
|
|
721
|
+
if find_spec("typer") and find_spec("typer.main"):
|
|
716
722
|
import typer # pyright: ignore[reportMissingImports]
|
|
717
723
|
|
|
718
724
|
if isinstance(hosting_cli, typer.Typer):
|