reflex 0.6.6a3__py3-none-any.whl → 0.6.6.post2__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/.templates/web/utils/state.js +23 -16
- reflex/components/core/upload.py +8 -5
- reflex/config.py +2 -2
- reflex/custom_components/custom_components.py +2 -2
- reflex/reflex.py +12 -188
- reflex/utils/prerequisites.py +19 -19
- reflex/utils/telemetry.py +1 -1
- {reflex-0.6.6a3.dist-info → reflex-0.6.6.post2.dist-info}/METADATA +2 -2
- {reflex-0.6.6a3.dist-info → reflex-0.6.6.post2.dist-info}/RECORD +12 -12
- {reflex-0.6.6a3.dist-info → reflex-0.6.6.post2.dist-info}/LICENSE +0 -0
- {reflex-0.6.6a3.dist-info → reflex-0.6.6.post2.dist-info}/WHEEL +0 -0
- {reflex-0.6.6a3.dist-info → reflex-0.6.6.post2.dist-info}/entry_points.txt +0 -0
|
@@ -457,7 +457,7 @@ export const connect = async (
|
|
|
457
457
|
socket.current.on("reload", async (event) => {
|
|
458
458
|
event_processing = false;
|
|
459
459
|
queueEvents([...initialEvents(), JSON5.parse(event)], socket);
|
|
460
|
-
})
|
|
460
|
+
});
|
|
461
461
|
|
|
462
462
|
document.addEventListener("visibilitychange", checkVisibility);
|
|
463
463
|
};
|
|
@@ -490,23 +490,30 @@ export const uploadFiles = async (
|
|
|
490
490
|
return false;
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
+
// Track how many partial updates have been processed for this upload.
|
|
493
494
|
let resp_idx = 0;
|
|
494
495
|
const eventHandler = (progressEvent) => {
|
|
495
|
-
|
|
496
|
+
const event_callbacks = socket._callbacks.$event;
|
|
497
|
+
// Whenever called, responseText will contain the entire response so far.
|
|
496
498
|
const chunks = progressEvent.event.target.responseText.trim().split("\n");
|
|
499
|
+
// So only process _new_ chunks beyond resp_idx.
|
|
497
500
|
chunks.slice(resp_idx).map((chunk) => {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
501
|
+
event_callbacks.map((f, ix) => {
|
|
502
|
+
f(chunk)
|
|
503
|
+
.then(() => {
|
|
504
|
+
if (ix === event_callbacks.length - 1) {
|
|
505
|
+
// Mark this chunk as processed.
|
|
506
|
+
resp_idx += 1;
|
|
507
|
+
}
|
|
508
|
+
})
|
|
509
|
+
.catch((e) => {
|
|
510
|
+
if (progressEvent.progress === 1) {
|
|
511
|
+
// Chunk may be incomplete, so only report errors when full response is available.
|
|
512
|
+
console.log("Error parsing chunk", chunk, e);
|
|
513
|
+
}
|
|
514
|
+
return;
|
|
515
|
+
});
|
|
516
|
+
});
|
|
510
517
|
});
|
|
511
518
|
};
|
|
512
519
|
|
|
@@ -711,7 +718,7 @@ export const useEventLoop = (
|
|
|
711
718
|
const combined_name = events.map((e) => e.name).join("+++");
|
|
712
719
|
if (event_actions?.temporal) {
|
|
713
720
|
if (!socket.current || !socket.current.connected) {
|
|
714
|
-
return;
|
|
721
|
+
return; // don't queue when the backend is not connected
|
|
715
722
|
}
|
|
716
723
|
}
|
|
717
724
|
if (event_actions?.throttle) {
|
|
@@ -852,7 +859,7 @@ export const useEventLoop = (
|
|
|
852
859
|
if (router.components[router.pathname].error) {
|
|
853
860
|
delete router.components[router.pathname].error;
|
|
854
861
|
}
|
|
855
|
-
}
|
|
862
|
+
};
|
|
856
863
|
router.events.on("routeChangeStart", change_start);
|
|
857
864
|
router.events.on("routeChangeComplete", change_complete);
|
|
858
865
|
router.events.on("routeChangeError", change_error);
|
reflex/components/core/upload.py
CHANGED
|
@@ -293,13 +293,15 @@ class Upload(MemoizationLeaf):
|
|
|
293
293
|
format.to_camel_case(key): value for key, value in upload_props.items()
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
use_dropzone_arguments =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
use_dropzone_arguments = Var.create(
|
|
297
|
+
{
|
|
298
|
+
"onDrop": event_var,
|
|
299
|
+
**upload_props,
|
|
300
|
+
}
|
|
301
|
+
)
|
|
300
302
|
|
|
301
303
|
left_side = f"const {{getRootProps: {root_props_unique_name}, getInputProps: {input_props_unique_name}}} "
|
|
302
|
-
right_side = f"useDropzone({str(
|
|
304
|
+
right_side = f"useDropzone({str(use_dropzone_arguments)})"
|
|
303
305
|
|
|
304
306
|
var_data = VarData.merge(
|
|
305
307
|
VarData(
|
|
@@ -307,6 +309,7 @@ class Upload(MemoizationLeaf):
|
|
|
307
309
|
hooks={Hooks.EVENTS: None},
|
|
308
310
|
),
|
|
309
311
|
event_var._get_all_var_data(),
|
|
312
|
+
use_dropzone_arguments._get_all_var_data(),
|
|
310
313
|
VarData(
|
|
311
314
|
hooks={
|
|
312
315
|
callback_str: None,
|
reflex/config.py
CHANGED
|
@@ -652,9 +652,9 @@ class Config(Base):
|
|
|
652
652
|
frontend_packages: List[str] = []
|
|
653
653
|
|
|
654
654
|
# The hosting service backend URL.
|
|
655
|
-
cp_backend_url: str = Hosting.
|
|
655
|
+
cp_backend_url: str = Hosting.HOSTING_SERVICE
|
|
656
656
|
# The hosting service frontend URL.
|
|
657
|
-
cp_web_url: str = Hosting.
|
|
657
|
+
cp_web_url: str = Hosting.HOSTING_SERVICE_UI
|
|
658
658
|
|
|
659
659
|
# The worker class used in production mode
|
|
660
660
|
gunicorn_worker_class: str = "uvicorn.workers.UvicornH11Worker"
|
|
@@ -827,11 +827,11 @@ def _collect_details_for_gallery():
|
|
|
827
827
|
Raises:
|
|
828
828
|
Exit: If pyproject.toml file is ill-formed or the request to the backend services fails.
|
|
829
829
|
"""
|
|
830
|
-
from
|
|
830
|
+
from reflex_cli.utils import hosting
|
|
831
831
|
|
|
832
832
|
console.rule("[bold]Authentication with Reflex Services")
|
|
833
833
|
console.print("First let's log in to Reflex backend services.")
|
|
834
|
-
access_token =
|
|
834
|
+
access_token, _ = hosting.authenticated_token()
|
|
835
835
|
|
|
836
836
|
console.rule("[bold]Custom Component Information")
|
|
837
837
|
params = {}
|
reflex/reflex.py
CHANGED
|
@@ -9,8 +9,6 @@ from typing import List, Optional
|
|
|
9
9
|
|
|
10
10
|
import typer
|
|
11
11
|
import typer.core
|
|
12
|
-
from reflex_cli.deployments import deployments_cli
|
|
13
|
-
from reflex_cli.utils import dependency
|
|
14
12
|
from reflex_cli.v2.deployments import check_version, hosting_cli
|
|
15
13
|
|
|
16
14
|
from reflex import constants
|
|
@@ -330,47 +328,16 @@ def export(
|
|
|
330
328
|
)
|
|
331
329
|
|
|
332
330
|
|
|
333
|
-
def _login() -> str:
|
|
334
|
-
"""Helper function to authenticate with Reflex hosting service."""
|
|
335
|
-
from reflex_cli.utils import hosting
|
|
336
|
-
|
|
337
|
-
access_token, invitation_code = hosting.authenticated_token()
|
|
338
|
-
if access_token:
|
|
339
|
-
console.print("You already logged in.")
|
|
340
|
-
return access_token
|
|
341
|
-
|
|
342
|
-
# If not already logged in, open a browser window/tab to the login page.
|
|
343
|
-
access_token = hosting.authenticate_on_browser(invitation_code)
|
|
344
|
-
|
|
345
|
-
if not access_token:
|
|
346
|
-
console.error("Unable to authenticate. Please try again or contact support.")
|
|
347
|
-
raise typer.Exit(1)
|
|
348
|
-
|
|
349
|
-
console.print("Successfully logged in.")
|
|
350
|
-
return access_token
|
|
351
|
-
|
|
352
|
-
|
|
353
331
|
@cli.command()
|
|
354
|
-
def login(
|
|
355
|
-
loglevel: constants.LogLevel = typer.Option(
|
|
356
|
-
config.loglevel, help="The log level to use."
|
|
357
|
-
),
|
|
358
|
-
):
|
|
359
|
-
"""Authenticate with Reflex hosting service."""
|
|
360
|
-
# Set the log level.
|
|
361
|
-
console.set_log_level(loglevel)
|
|
362
|
-
|
|
363
|
-
_login()
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
@cli.command()
|
|
367
|
-
def loginv2(loglevel: constants.LogLevel = typer.Option(config.loglevel)):
|
|
332
|
+
def login(loglevel: constants.LogLevel = typer.Option(config.loglevel)):
|
|
368
333
|
"""Authenicate with experimental Reflex hosting service."""
|
|
369
334
|
from reflex_cli.v2 import cli as hosting_cli
|
|
370
335
|
|
|
371
336
|
check_version()
|
|
372
337
|
|
|
373
|
-
hosting_cli.login()
|
|
338
|
+
validated_info = hosting_cli.login()
|
|
339
|
+
if validated_info is not None:
|
|
340
|
+
telemetry.send("login", user_uuid=validated_info.get("user_id"))
|
|
374
341
|
|
|
375
342
|
|
|
376
343
|
@cli.command()
|
|
@@ -380,31 +347,11 @@ def logout(
|
|
|
380
347
|
),
|
|
381
348
|
):
|
|
382
349
|
"""Log out of access to Reflex hosting service."""
|
|
383
|
-
from reflex_cli.
|
|
384
|
-
|
|
385
|
-
console.set_log_level(loglevel)
|
|
386
|
-
|
|
387
|
-
hosting.log_out_on_browser()
|
|
388
|
-
console.debug("Deleting access token from config locally")
|
|
389
|
-
hosting.delete_token_from_config(include_invitation_code=True)
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
@cli.command()
|
|
393
|
-
def logoutv2(
|
|
394
|
-
loglevel: constants.LogLevel = typer.Option(
|
|
395
|
-
config.loglevel, help="The log level to use."
|
|
396
|
-
),
|
|
397
|
-
):
|
|
398
|
-
"""Log out of access to Reflex hosting service."""
|
|
399
|
-
from reflex_cli.v2.utils import hosting
|
|
350
|
+
from reflex_cli.v2.cli import logout
|
|
400
351
|
|
|
401
352
|
check_version()
|
|
402
353
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
hosting.log_out_on_browser()
|
|
406
|
-
console.debug("Deleting access token from config locally")
|
|
407
|
-
hosting.delete_token_from_config()
|
|
354
|
+
logout(loglevel) # type: ignore
|
|
408
355
|
|
|
409
356
|
|
|
410
357
|
db_cli = typer.Typer()
|
|
@@ -489,126 +436,6 @@ def makemigrations(
|
|
|
489
436
|
|
|
490
437
|
@cli.command()
|
|
491
438
|
def deploy(
|
|
492
|
-
key: Optional[str] = typer.Option(
|
|
493
|
-
None,
|
|
494
|
-
"-k",
|
|
495
|
-
"--deployment-key",
|
|
496
|
-
help="The name of the deployment. Domain name safe characters only.",
|
|
497
|
-
),
|
|
498
|
-
app_name: str = typer.Option(
|
|
499
|
-
config.app_name,
|
|
500
|
-
"--app-name",
|
|
501
|
-
help="The name of the App to deploy under.",
|
|
502
|
-
hidden=True,
|
|
503
|
-
),
|
|
504
|
-
regions: List[str] = typer.Option(
|
|
505
|
-
list(),
|
|
506
|
-
"-r",
|
|
507
|
-
"--region",
|
|
508
|
-
help="The regions to deploy to.",
|
|
509
|
-
),
|
|
510
|
-
envs: List[str] = typer.Option(
|
|
511
|
-
list(),
|
|
512
|
-
"--env",
|
|
513
|
-
help="The environment variables to set: <key>=<value>. For multiple envs, repeat this option, e.g. --env k1=v2 --env k2=v2.",
|
|
514
|
-
),
|
|
515
|
-
cpus: Optional[int] = typer.Option(
|
|
516
|
-
None, help="The number of CPUs to allocate.", hidden=True
|
|
517
|
-
),
|
|
518
|
-
memory_mb: Optional[int] = typer.Option(
|
|
519
|
-
None, help="The amount of memory to allocate.", hidden=True
|
|
520
|
-
),
|
|
521
|
-
auto_start: Optional[bool] = typer.Option(
|
|
522
|
-
None,
|
|
523
|
-
help="Whether to auto start the instance.",
|
|
524
|
-
hidden=True,
|
|
525
|
-
),
|
|
526
|
-
auto_stop: Optional[bool] = typer.Option(
|
|
527
|
-
None,
|
|
528
|
-
help="Whether to auto stop the instance.",
|
|
529
|
-
hidden=True,
|
|
530
|
-
),
|
|
531
|
-
frontend_hostname: Optional[str] = typer.Option(
|
|
532
|
-
None,
|
|
533
|
-
"--frontend-hostname",
|
|
534
|
-
help="The hostname of the frontend.",
|
|
535
|
-
hidden=True,
|
|
536
|
-
),
|
|
537
|
-
interactive: bool = typer.Option(
|
|
538
|
-
True,
|
|
539
|
-
help="Whether to list configuration options and ask for confirmation.",
|
|
540
|
-
),
|
|
541
|
-
with_metrics: Optional[str] = typer.Option(
|
|
542
|
-
None,
|
|
543
|
-
help="Setting for metrics scraping for the deployment. Setup required in user code.",
|
|
544
|
-
hidden=True,
|
|
545
|
-
),
|
|
546
|
-
with_tracing: Optional[str] = typer.Option(
|
|
547
|
-
None,
|
|
548
|
-
help="Setting to export tracing for the deployment. Setup required in user code.",
|
|
549
|
-
hidden=True,
|
|
550
|
-
),
|
|
551
|
-
upload_db_file: bool = typer.Option(
|
|
552
|
-
False,
|
|
553
|
-
help="Whether to include local sqlite db files when uploading to hosting service.",
|
|
554
|
-
hidden=True,
|
|
555
|
-
),
|
|
556
|
-
loglevel: constants.LogLevel = typer.Option(
|
|
557
|
-
config.loglevel, help="The log level to use."
|
|
558
|
-
),
|
|
559
|
-
):
|
|
560
|
-
"""Deploy the app to the Reflex hosting service."""
|
|
561
|
-
from reflex_cli import cli as hosting_cli
|
|
562
|
-
|
|
563
|
-
from reflex.utils import export as export_utils
|
|
564
|
-
from reflex.utils import prerequisites
|
|
565
|
-
|
|
566
|
-
# Set the log level.
|
|
567
|
-
console.set_log_level(loglevel)
|
|
568
|
-
|
|
569
|
-
# Only check requirements if interactive. There is user interaction for requirements update.
|
|
570
|
-
if interactive:
|
|
571
|
-
dependency.check_requirements()
|
|
572
|
-
|
|
573
|
-
# Check if we are set up.
|
|
574
|
-
if prerequisites.needs_reinit(frontend=True):
|
|
575
|
-
_init(name=config.app_name, loglevel=loglevel)
|
|
576
|
-
prerequisites.check_latest_package_version(constants.ReflexHostingCLI.MODULE_NAME)
|
|
577
|
-
|
|
578
|
-
hosting_cli.deploy(
|
|
579
|
-
app_name=app_name,
|
|
580
|
-
export_fn=lambda zip_dest_dir,
|
|
581
|
-
api_url,
|
|
582
|
-
deploy_url,
|
|
583
|
-
frontend,
|
|
584
|
-
backend,
|
|
585
|
-
zipping: export_utils.export(
|
|
586
|
-
zip_dest_dir=zip_dest_dir,
|
|
587
|
-
api_url=api_url,
|
|
588
|
-
deploy_url=deploy_url,
|
|
589
|
-
frontend=frontend,
|
|
590
|
-
backend=backend,
|
|
591
|
-
zipping=zipping,
|
|
592
|
-
loglevel=loglevel.subprocess_level(),
|
|
593
|
-
upload_db_file=upload_db_file,
|
|
594
|
-
),
|
|
595
|
-
key=key,
|
|
596
|
-
regions=regions,
|
|
597
|
-
envs=envs,
|
|
598
|
-
cpus=cpus,
|
|
599
|
-
memory_mb=memory_mb,
|
|
600
|
-
auto_start=auto_start,
|
|
601
|
-
auto_stop=auto_stop,
|
|
602
|
-
frontend_hostname=frontend_hostname,
|
|
603
|
-
interactive=interactive,
|
|
604
|
-
with_metrics=with_metrics,
|
|
605
|
-
with_tracing=with_tracing,
|
|
606
|
-
loglevel=loglevel.subprocess_level(),
|
|
607
|
-
)
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
@cli.command()
|
|
611
|
-
def deployv2(
|
|
612
439
|
app_name: str = typer.Option(
|
|
613
440
|
config.app_name,
|
|
614
441
|
"--app-name",
|
|
@@ -660,8 +487,8 @@ def deployv2(
|
|
|
660
487
|
),
|
|
661
488
|
):
|
|
662
489
|
"""Deploy the app to the Reflex hosting service."""
|
|
490
|
+
from reflex_cli.utils import dependency
|
|
663
491
|
from reflex_cli.v2 import cli as hosting_cli
|
|
664
|
-
from reflex_cli.v2.utils import dependency
|
|
665
492
|
|
|
666
493
|
from reflex.utils import export as export_utils
|
|
667
494
|
from reflex.utils import prerequisites
|
|
@@ -670,6 +497,8 @@ def deployv2(
|
|
|
670
497
|
|
|
671
498
|
# Set the log level.
|
|
672
499
|
console.set_log_level(loglevel)
|
|
500
|
+
# make sure user is logged in.
|
|
501
|
+
hosting_cli.login()
|
|
673
502
|
|
|
674
503
|
# Only check requirements if interactive.
|
|
675
504
|
# There is user interaction for requirements update.
|
|
@@ -703,7 +532,7 @@ def deployv2(
|
|
|
703
532
|
envfile=envfile,
|
|
704
533
|
hostname=hostname,
|
|
705
534
|
interactive=interactive,
|
|
706
|
-
loglevel=loglevel.
|
|
535
|
+
loglevel=type(loglevel).INFO, # type: ignore
|
|
707
536
|
token=token,
|
|
708
537
|
project=project,
|
|
709
538
|
)
|
|
@@ -711,15 +540,10 @@ def deployv2(
|
|
|
711
540
|
|
|
712
541
|
cli.add_typer(db_cli, name="db", help="Subcommands for managing the database schema.")
|
|
713
542
|
cli.add_typer(script_cli, name="script", help="Subcommands running helper scripts.")
|
|
714
|
-
cli.add_typer(
|
|
715
|
-
deployments_cli,
|
|
716
|
-
name="deployments",
|
|
717
|
-
help="Subcommands for managing the Deployments.",
|
|
718
|
-
)
|
|
719
543
|
cli.add_typer(
|
|
720
544
|
hosting_cli,
|
|
721
|
-
name="
|
|
722
|
-
help="Subcommands for managing the
|
|
545
|
+
name="cloud",
|
|
546
|
+
help="Subcommands for managing the reflex cloud.",
|
|
723
547
|
)
|
|
724
548
|
cli.add_typer(
|
|
725
549
|
custom_components_cli,
|
reflex/utils/prerequisites.py
CHANGED
|
@@ -1408,13 +1408,22 @@ def validate_and_create_app_using_remote_template(app_name, template, templates)
|
|
|
1408
1408
|
"""
|
|
1409
1409
|
# If user selects a template, it needs to exist.
|
|
1410
1410
|
if template in templates:
|
|
1411
|
+
from reflex_cli.v2.utils import hosting
|
|
1412
|
+
|
|
1413
|
+
authenticated_token = hosting.authenticated_token()
|
|
1414
|
+
if not authenticated_token or not authenticated_token[0]:
|
|
1415
|
+
console.print(
|
|
1416
|
+
f"Please use `reflex login` to access the '{template}' template."
|
|
1417
|
+
)
|
|
1418
|
+
raise typer.Exit(3)
|
|
1419
|
+
|
|
1411
1420
|
template_url = templates[template].code_url
|
|
1412
1421
|
else:
|
|
1413
1422
|
# Check if the template is a github repo.
|
|
1414
1423
|
if template.startswith("https://github.com"):
|
|
1415
1424
|
template_url = f"{template.strip('/').replace('.git', '')}/archive/main.zip"
|
|
1416
1425
|
else:
|
|
1417
|
-
console.error(f"Template `{template}` not found.")
|
|
1426
|
+
console.error(f"Template `{template}` not found or invalid.")
|
|
1418
1427
|
raise typer.Exit(1)
|
|
1419
1428
|
|
|
1420
1429
|
if template_url is None:
|
|
@@ -1451,7 +1460,7 @@ def generate_template_using_ai(template: str | None = None) -> str:
|
|
|
1451
1460
|
|
|
1452
1461
|
|
|
1453
1462
|
def fetch_remote_templates(
|
|
1454
|
-
template:
|
|
1463
|
+
template: str,
|
|
1455
1464
|
) -> tuple[str, dict[str, Template]]:
|
|
1456
1465
|
"""Fetch the available remote templates.
|
|
1457
1466
|
|
|
@@ -1460,9 +1469,6 @@ def fetch_remote_templates(
|
|
|
1460
1469
|
|
|
1461
1470
|
Returns:
|
|
1462
1471
|
The selected template and the available templates.
|
|
1463
|
-
|
|
1464
|
-
Raises:
|
|
1465
|
-
Exit: If the template is not valid or if the template is not specified.
|
|
1466
1472
|
"""
|
|
1467
1473
|
available_templates = {}
|
|
1468
1474
|
|
|
@@ -1474,19 +1480,7 @@ def fetch_remote_templates(
|
|
|
1474
1480
|
console.debug(f"Error while fetching templates: {e}")
|
|
1475
1481
|
template = constants.Templates.DEFAULT
|
|
1476
1482
|
|
|
1477
|
-
|
|
1478
|
-
return template, available_templates
|
|
1479
|
-
|
|
1480
|
-
if template in available_templates:
|
|
1481
|
-
return template, available_templates
|
|
1482
|
-
|
|
1483
|
-
else:
|
|
1484
|
-
if template is not None:
|
|
1485
|
-
console.error(f"{template!r} is not a valid template name.")
|
|
1486
|
-
console.print(
|
|
1487
|
-
f"Go to the templates page ({constants.Templates.REFLEX_TEMPLATES_URL}) and copy the command to init with a template."
|
|
1488
|
-
)
|
|
1489
|
-
raise typer.Exit(0)
|
|
1483
|
+
return template, available_templates
|
|
1490
1484
|
|
|
1491
1485
|
|
|
1492
1486
|
def initialize_app(
|
|
@@ -1501,6 +1495,9 @@ def initialize_app(
|
|
|
1501
1495
|
|
|
1502
1496
|
Returns:
|
|
1503
1497
|
The name of the template.
|
|
1498
|
+
|
|
1499
|
+
Raises:
|
|
1500
|
+
Exit: If the template is not valid or unspecified.
|
|
1504
1501
|
"""
|
|
1505
1502
|
# Local imports to avoid circular imports.
|
|
1506
1503
|
from reflex.utils import telemetry
|
|
@@ -1528,7 +1525,10 @@ def initialize_app(
|
|
|
1528
1525
|
# change to the default to allow creation of default app
|
|
1529
1526
|
template = constants.Templates.DEFAULT
|
|
1530
1527
|
elif template == constants.Templates.CHOOSE_TEMPLATES:
|
|
1531
|
-
|
|
1528
|
+
console.print(
|
|
1529
|
+
f"Go to the templates page ({constants.Templates.REFLEX_TEMPLATES_URL}) and copy the command to init with a template."
|
|
1530
|
+
)
|
|
1531
|
+
raise typer.Exit(0)
|
|
1532
1532
|
|
|
1533
1533
|
# If the blank template is selected, create a blank app.
|
|
1534
1534
|
if template in (constants.Templates.DEFAULT,):
|
reflex/utils/telemetry.py
CHANGED
|
@@ -129,7 +129,7 @@ def _prepare_event(event: str, **kwargs) -> dict:
|
|
|
129
129
|
|
|
130
130
|
cpuinfo = get_cpu_info()
|
|
131
131
|
|
|
132
|
-
additional_keys = ["template", "context", "detail"]
|
|
132
|
+
additional_keys = ["template", "context", "detail", "user_uuid"]
|
|
133
133
|
additional_fields = {
|
|
134
134
|
key: value for key in additional_keys if (value := kwargs.get(key)) is not None
|
|
135
135
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: reflex
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.6.post2
|
|
4
4
|
Summary: Web apps in pure Python.
|
|
5
5
|
Home-page: https://reflex.dev
|
|
6
6
|
License: Apache-2.0
|
|
@@ -33,7 +33,7 @@ Requires-Dist: python-multipart (>=0.0.5,<0.1)
|
|
|
33
33
|
Requires-Dist: python-socketio (>=5.7.0,<6.0)
|
|
34
34
|
Requires-Dist: redis (>=4.3.5,<6.0)
|
|
35
35
|
Requires-Dist: reflex-chakra (>=0.6.0)
|
|
36
|
-
Requires-Dist: reflex-hosting-cli (>=0.1.
|
|
36
|
+
Requires-Dist: reflex-hosting-cli (>=0.1.29,<2.0)
|
|
37
37
|
Requires-Dist: rich (>=13.0.0,<14.0)
|
|
38
38
|
Requires-Dist: setuptools (>=75.0)
|
|
39
39
|
Requires-Dist: sqlmodel (>=0.0.14,<0.1)
|
|
@@ -34,7 +34,7 @@ reflex/.templates/web/utils/helpers/debounce.js,sha256=xGhtTRtS_xIcaeqnYVvYJNseL
|
|
|
34
34
|
reflex/.templates/web/utils/helpers/paste.js,sha256=ef30HsR83jRzzvZnl8yV79yqFP8TC_u8SlN99cCS_OM,1799
|
|
35
35
|
reflex/.templates/web/utils/helpers/range.js,sha256=FevdZzCVxjF57ullfjpcUpeOXRxh5v09YnBB0jPbrS4,1152
|
|
36
36
|
reflex/.templates/web/utils/helpers/throttle.js,sha256=qxeyaEojaTeX36FPGftzVWrzDsRQU4iqg3U9RJz9Vj4,566
|
|
37
|
-
reflex/.templates/web/utils/state.js,sha256=
|
|
37
|
+
reflex/.templates/web/utils/state.js,sha256=Js2Ufg3xfJUbqLnLdON6sC1w8Y-oC6oQQDrrluRGinU,28535
|
|
38
38
|
reflex/__init__.py,sha256=4R4EdOqGs60L9YmqrOpVhm39VDOpF9sGQ6ir4S-YGiY,10708
|
|
39
39
|
reflex/__init__.pyi,sha256=K-xiTA024j_a9twP4H8nmbl82GGskoyQ66FJ2QqyXl4,11233
|
|
40
40
|
reflex/__main__.py,sha256=6cVrGEyT3j3tEvlEVUatpaYfbB5EF3UVY-6vc_Z7-hw,108
|
|
@@ -94,7 +94,7 @@ reflex/components/core/html.pyi,sha256=VPpzNa7VORqu1IDQae4NbHXsCFzo2mELV8kIdCveN
|
|
|
94
94
|
reflex/components/core/layout/__init__.py,sha256=znldZaj_NGt8qCZDG70GMwjMTskcvCf_2N_EjCAHwdc,30
|
|
95
95
|
reflex/components/core/match.py,sha256=xhzO8LHl99Gd6yoPJ-UFZsPqilHwZJ7SWJmhly5_exE,9102
|
|
96
96
|
reflex/components/core/responsive.py,sha256=ACZdtJ4a4F8B3dm1k8h6J2_UJx0Z5LDB7XHQ2ty4wAc,1911
|
|
97
|
-
reflex/components/core/upload.py,sha256=
|
|
97
|
+
reflex/components/core/upload.py,sha256=va133I431he-08WyUhc0iJaGQ4kA1xzrFl-Ye-pBjBo,11951
|
|
98
98
|
reflex/components/core/upload.pyi,sha256=nzfugMkqXgOhlvTMhCCQl6t36oJ-NOUuS0Xz6G6xNqo,16115
|
|
99
99
|
reflex/components/datadisplay/__init__.py,sha256=L8pWWKNHWdUD2fbZRoEKjd_8c_hpDdGYO463hwkoIi4,438
|
|
100
100
|
reflex/components/datadisplay/__init__.pyi,sha256=rYMwO_X4NvUex6IL2MMTnhdFRp8Lz5zweMwXaW_l7nc,588
|
|
@@ -322,7 +322,7 @@ reflex/components/tags/iter_tag.py,sha256=kdJeQbCJ02Cn5VPDRERywu8bJNrTgreIi3ZyOA
|
|
|
322
322
|
reflex/components/tags/match_tag.py,sha256=mqQF6fHhOSGSMdiaJ7YlwXSMhRtDmmIBu1Gw-VQQ324,586
|
|
323
323
|
reflex/components/tags/tag.py,sha256=5nlh1SU6Mwod8vyGCsV-iixd4xa_4cqU2vsBxHEA5ak,3084
|
|
324
324
|
reflex/components/tags/tagless.py,sha256=qO7Gm4V0ITDyymHkyltfz53155ZBt-W_WIPDYy93ca0,587
|
|
325
|
-
reflex/config.py,sha256=
|
|
325
|
+
reflex/config.py,sha256=_FPaTJbAQ-ziyfifMl2vY4GR8dBgM-5fD19vLZ_uXjg,26746
|
|
326
326
|
reflex/constants/__init__.py,sha256=VIF5rXe4-R_gdPX-G2dM8tw9X206GhjXAhWdOPtxctM,1974
|
|
327
327
|
reflex/constants/base.py,sha256=w9pF4mJV5GujJxDPdh1Yrxn6lv0328sjkQRTEQ1np4k,7444
|
|
328
328
|
reflex/constants/colors.py,sha256=cgLn8iEWtlpjQgbhhlCOGjbhfOULKnzqqzPph63SJoI,1613
|
|
@@ -336,7 +336,7 @@ reflex/constants/state.py,sha256=6Mfr7xVcAZOj5aSy7kp0W6r8oTs7K30URgGDAAFLfPQ,294
|
|
|
336
336
|
reflex/constants/style.py,sha256=-LTofj8rBEAYEx8_Zj4Tda_EEPvgp2BjpLinarNOu2o,475
|
|
337
337
|
reflex/constants/utils.py,sha256=HGOSq9c-xGbCb1xoLAGLBdc-FOE8iuBzvuU24zSfsV0,789
|
|
338
338
|
reflex/custom_components/__init__.py,sha256=R4zsvOi4dfPmHc18KEphohXnQFBPnUCb50cMR5hSLDE,36
|
|
339
|
-
reflex/custom_components/custom_components.py,sha256=
|
|
339
|
+
reflex/custom_components/custom_components.py,sha256=0W8PfQwY1TqK4Qcfjki3RaE9CVcte5CLwI1SXa-xxMI,33047
|
|
340
340
|
reflex/event.py,sha256=76eK-bWvD5x2DJbYamHxO9sL_ZxxDOABkdTKwN3whTo,55996
|
|
341
341
|
reflex/experimental/__init__.py,sha256=Tzh48jIncw2YzRFHh2SXWZ599TsHeY6_RrrWdK6gE2A,2085
|
|
342
342
|
reflex/experimental/assets.py,sha256=9qkhgcNo-xfpjHVZ1-lN79tB5qbWw_2nYaVliaV4Z4A,1098
|
|
@@ -356,7 +356,7 @@ reflex/middleware/hydrate_middleware.py,sha256=KvFppl4ca75bsjos5boy8EGwsRBZ9jI6Z
|
|
|
356
356
|
reflex/middleware/middleware.py,sha256=9eASK3MrbK1AvT2Sx5GFxXNwSuNW8_LTRGvPY1JccU4,1171
|
|
357
357
|
reflex/model.py,sha256=AaCs6V9iWFj-EZI7zfXL1LTy-TrnNfJKVit2MPqLM8M,14139
|
|
358
358
|
reflex/page.py,sha256=N85R5tTI-NoFd9ArwYCN8OcV9aSPZIPrJI2ZFbH8ytk,2389
|
|
359
|
-
reflex/reflex.py,sha256=
|
|
359
|
+
reflex/reflex.py,sha256=F_7NpkxNwSPAi4nYeuLhuBAmrcB6lbnJP93Z2b0kBwA,16642
|
|
360
360
|
reflex/route.py,sha256=WZS7stKgO94nekFFYHaOqNgN3zZGpJb3YpGF4ViTHmw,4198
|
|
361
361
|
reflex/state.py,sha256=qFeY7g8SUovb3V-QNcoWS47eG4S4Y4_WV8gFb6rrJBI,134231
|
|
362
362
|
reflex/style.py,sha256=-mBrpaq23jiNJIwgCir6Fzj182u9rGpp3qZ2cUt5aZs,12695
|
|
@@ -374,13 +374,13 @@ reflex/utils/imports.py,sha256=_8TBm9TWOSwbd3uZp1KbvRvHbF-Bucv8ifBcp8ItAo0,3871
|
|
|
374
374
|
reflex/utils/lazy_loader.py,sha256=utVpUjKcz32GC1I7g0g7OlTyvVoZNFcuAjNtnxiSYww,1282
|
|
375
375
|
reflex/utils/net.py,sha256=0Yd9OLK8R_px2sqnqrDkTky6hYHtG2pEDvvilOjDfjc,1219
|
|
376
376
|
reflex/utils/path_ops.py,sha256=zMf3RnsbAU9WnJzL3pT54qAqTHWRuMWm4AztjXXonE4,5804
|
|
377
|
-
reflex/utils/prerequisites.py,sha256=
|
|
377
|
+
reflex/utils/prerequisites.py,sha256=VNo1FNroLWLFX1ttOVuRz_MSCHpDR2X2RJrgKJrxI-8,57892
|
|
378
378
|
reflex/utils/processes.py,sha256=wBvkxHUnuo28nFNSIyx53RpiNUa08bmvWQxpx8LWQhk,13249
|
|
379
379
|
reflex/utils/pyi_generator.py,sha256=9Uv5O0A1852KcMO1U7_C2DkJ6c5bxzr_ld13I7ADO_E,40521
|
|
380
380
|
reflex/utils/redir.py,sha256=bmQGAgoNWwySeLRQTpoMpmKInwIOCW77wkXT61fwcj8,1868
|
|
381
381
|
reflex/utils/registry.py,sha256=FJZ8ltG2PK4CCOfZXe4h3ruH4tXqh5q_9rQ2cGZn0Mo,1413
|
|
382
382
|
reflex/utils/serializers.py,sha256=j-Hvo-sCEEVBEuFxlDHpZLpJDeHlby9qNzhJD8DOnM4,12522
|
|
383
|
-
reflex/utils/telemetry.py,sha256=
|
|
383
|
+
reflex/utils/telemetry.py,sha256=vgb2THHcclT_GBBRYsiCpMHW3hL7B2i-v72NOSxsup4,5686
|
|
384
384
|
reflex/utils/types.py,sha256=7khuemCSig_7S1s5rx58TBKsY5HnpGNFtdYhfxlx6hc,26223
|
|
385
385
|
reflex/vars/__init__.py,sha256=gCFNFJioJpZK4KDaBHYyJ0JBgR29mA6lnNIltiRfg0I,1194
|
|
386
386
|
reflex/vars/base.py,sha256=yBG5Q1jz78Erng4woBbHWtG8K7pyqxIysd2KRLemVRA,87764
|
|
@@ -388,8 +388,8 @@ reflex/vars/function.py,sha256=w_Xa7GGVHbcfP7nMqKG5-q9Y7Uj3Yinj1Csjqxz_leg,14596
|
|
|
388
388
|
reflex/vars/number.py,sha256=BeHQr4Cj2gdXekEWcxSzLTIuRAC3sf6YvsdHlADETpQ,27499
|
|
389
389
|
reflex/vars/object.py,sha256=dTfkkUGDmoxu7iPcKSnNJ-lTI48yoXbagUyA-lKwDDo,14335
|
|
390
390
|
reflex/vars/sequence.py,sha256=mlmOkSV8FIxwdJHzQdu3NzHAoNB4KcGc93dcmdviIoo,49916
|
|
391
|
-
reflex-0.6.
|
|
392
|
-
reflex-0.6.
|
|
393
|
-
reflex-0.6.
|
|
394
|
-
reflex-0.6.
|
|
395
|
-
reflex-0.6.
|
|
391
|
+
reflex-0.6.6.post2.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
392
|
+
reflex-0.6.6.post2.dist-info/METADATA,sha256=NrXKvgixMExtGBQg4c8f4uaKqhvxLAUUkRKUUPk0vJA,12105
|
|
393
|
+
reflex-0.6.6.post2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
394
|
+
reflex-0.6.6.post2.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
395
|
+
reflex-0.6.6.post2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|