reflex 0.4.6a1__py3-none-any.whl → 0.4.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/custom_components/custom_components.py +28 -37
- {reflex-0.4.6a1.dist-info → reflex-0.4.6a2.dist-info}/METADATA +4 -4
- {reflex-0.4.6a1.dist-info → reflex-0.4.6a2.dist-info}/RECORD +6 -6
- {reflex-0.4.6a1.dist-info → reflex-0.4.6a2.dist-info}/LICENSE +0 -0
- {reflex-0.4.6a1.dist-info → reflex-0.4.6a2.dist-info}/WHEEL +0 -0
- {reflex-0.4.6a1.dist-info → reflex-0.4.6a2.dist-info}/entry_points.txt +0 -0
|
@@ -564,7 +564,7 @@ def _ensure_dist_dir(version_to_publish: str, build: bool):
|
|
|
564
564
|
needs_rebuild = (
|
|
565
565
|
console.ask(
|
|
566
566
|
"Distribution files for the version to be published already exist. Do you want to rebuild?",
|
|
567
|
-
choices=["
|
|
567
|
+
choices=["y", "n"],
|
|
568
568
|
default="n",
|
|
569
569
|
)
|
|
570
570
|
== "y"
|
|
@@ -668,10 +668,10 @@ def publish(
|
|
|
668
668
|
if validate_project_info and (
|
|
669
669
|
console.ask(
|
|
670
670
|
"Would you like to interactively review the package information?",
|
|
671
|
-
choices=["
|
|
672
|
-
default="
|
|
671
|
+
choices=["y", "n"],
|
|
672
|
+
default="y",
|
|
673
673
|
)
|
|
674
|
-
== "
|
|
674
|
+
== "y"
|
|
675
675
|
):
|
|
676
676
|
_validate_project_info()
|
|
677
677
|
|
|
@@ -702,7 +702,7 @@ def publish(
|
|
|
702
702
|
if (
|
|
703
703
|
console.ask(
|
|
704
704
|
"Would you like to include your published component on our gallery?",
|
|
705
|
-
choices=["
|
|
705
|
+
choices=["y", "n"],
|
|
706
706
|
default="y",
|
|
707
707
|
)
|
|
708
708
|
== "n"
|
|
@@ -807,11 +807,6 @@ def _collect_details_for_gallery():
|
|
|
807
807
|
"""
|
|
808
808
|
from reflex.reflex import _login
|
|
809
809
|
|
|
810
|
-
console.print("We recommend that you deploy a demo app showcasing the component.")
|
|
811
|
-
console.print("If not already, please deploy it first.")
|
|
812
|
-
if console.ask("Continue?", choices=["y", "n"], default="y") != "y":
|
|
813
|
-
return
|
|
814
|
-
|
|
815
810
|
console.rule("[bold]Authentication with Reflex Services")
|
|
816
811
|
console.print("First let's log in to Reflex backend services.")
|
|
817
812
|
access_token = _login()
|
|
@@ -829,34 +824,43 @@ def _collect_details_for_gallery():
|
|
|
829
824
|
)
|
|
830
825
|
package_name = console.ask("[ Published python package name ]")
|
|
831
826
|
console.print(f"[ Custom component package name ] : {package_name}")
|
|
827
|
+
params["package_name"] = package_name
|
|
832
828
|
|
|
833
829
|
# Check the backend services if the user is allowed to update information of this package is already shared.
|
|
834
|
-
expected_status_code = False
|
|
835
830
|
try:
|
|
836
831
|
console.debug(
|
|
837
|
-
f"Checking if user has permission to
|
|
832
|
+
f"Checking if user has permission to upsert information for {package_name} by POST."
|
|
838
833
|
)
|
|
839
|
-
|
|
840
|
-
|
|
834
|
+
# Send a POST request to achieve two things at once:
|
|
835
|
+
# 1. Check if the package is already shared by the user. If not, the backend will return 403.
|
|
836
|
+
# 2. If this package is not shared before, this request records the package name in the backend.
|
|
837
|
+
response = httpx.post(
|
|
838
|
+
POST_CUSTOM_COMPONENTS_GALLERY_ENDPOINT,
|
|
841
839
|
headers={"Authorization": f"Bearer {access_token}"},
|
|
840
|
+
data=params,
|
|
842
841
|
)
|
|
843
842
|
if response.status_code == httpx.codes.FORBIDDEN:
|
|
844
843
|
console.error(
|
|
845
844
|
f"{package_name} is owned by another user. Unable to update the information for it."
|
|
846
845
|
)
|
|
847
846
|
raise typer.Exit(code=1)
|
|
848
|
-
elif response.status_code == httpx.codes.NOT_FOUND:
|
|
849
|
-
console.debug(f"{package_name} is not found. This is a new share.")
|
|
850
|
-
expected_status_code = True
|
|
851
|
-
|
|
852
847
|
response.raise_for_status()
|
|
853
|
-
console.debug(f"{package_name} is found. This is an update.")
|
|
854
848
|
except httpx.HTTPError as he:
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
raise typer.Exit(code=1) from he
|
|
849
|
+
console.error(f"Unable to complete request due to {he}.")
|
|
850
|
+
raise typer.Exit(code=1) from he
|
|
858
851
|
|
|
859
|
-
|
|
852
|
+
display_name = (
|
|
853
|
+
console.ask("[ Friendly display name for your component ] (enter to skip)")
|
|
854
|
+
or None
|
|
855
|
+
)
|
|
856
|
+
if display_name:
|
|
857
|
+
params["display_name"] = display_name
|
|
858
|
+
|
|
859
|
+
files = []
|
|
860
|
+
if (image_file_and_extension := _get_file_from_prompt_in_loop()) is not None:
|
|
861
|
+
files.append(
|
|
862
|
+
("files", (image_file_and_extension[1], image_file_and_extension[0]))
|
|
863
|
+
)
|
|
860
864
|
|
|
861
865
|
demo_url = None
|
|
862
866
|
while True:
|
|
@@ -871,19 +875,6 @@ def _collect_details_for_gallery():
|
|
|
871
875
|
if demo_url:
|
|
872
876
|
params["demo_url"] = demo_url
|
|
873
877
|
|
|
874
|
-
display_name = (
|
|
875
|
-
console.ask("[ Friendly display name for your component ] (enter to skip)")
|
|
876
|
-
or None
|
|
877
|
-
)
|
|
878
|
-
if display_name:
|
|
879
|
-
params["display_name"] = display_name
|
|
880
|
-
|
|
881
|
-
files = []
|
|
882
|
-
if (image_file_and_extension := _get_file_from_prompt_in_loop()) is not None:
|
|
883
|
-
files.append(
|
|
884
|
-
("files", (image_file_and_extension[1], image_file_and_extension[0]))
|
|
885
|
-
)
|
|
886
|
-
|
|
887
878
|
# Now send the post request to Reflex backend services.
|
|
888
879
|
try:
|
|
889
880
|
console.debug(f"Sending custom component data: {params}")
|
|
@@ -919,7 +910,7 @@ def _get_file_from_prompt_in_loop() -> Tuple[bytes, str] | None:
|
|
|
919
910
|
image_file = file_extension = None
|
|
920
911
|
while image_file is None:
|
|
921
912
|
image_filepath = console.ask(
|
|
922
|
-
f"
|
|
913
|
+
f"Upload a preview image of your demo app (enter to skip)"
|
|
923
914
|
)
|
|
924
915
|
if not image_filepath:
|
|
925
916
|
break
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: reflex
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.6a2
|
|
4
4
|
Summary: Web apps in pure Python.
|
|
5
5
|
Home-page: https://reflex.dev
|
|
6
6
|
License: Apache-2.0
|
|
@@ -39,9 +39,9 @@ Requires-Dist: sqlmodel (>=0.0.14,<0.1)
|
|
|
39
39
|
Requires-Dist: starlette-admin (>=0.11.0,<1.0)
|
|
40
40
|
Requires-Dist: tomlkit (>=0.12.4,<1.0)
|
|
41
41
|
Requires-Dist: twine (>=4.0.0,<6.0)
|
|
42
|
-
Requires-Dist: typer (>=0.4.2,<
|
|
43
|
-
Requires-Dist: uvicorn (>=0.20.0,<
|
|
44
|
-
Requires-Dist: uvicorn (>=0.24.0,<
|
|
42
|
+
Requires-Dist: typer (>=0.4.2,<0.12.0)
|
|
43
|
+
Requires-Dist: uvicorn (>=0.20.0,<0.21.0) ; python_version < "3.12"
|
|
44
|
+
Requires-Dist: uvicorn (>=0.24.0,<0.25.0) ; python_version >= "3.12"
|
|
45
45
|
Requires-Dist: watchdog (>=2.3.1,<5.0)
|
|
46
46
|
Requires-Dist: watchfiles (>=0.19.0,<1.0)
|
|
47
47
|
Requires-Dist: wheel (>=0.42.0,<1.0)
|
|
@@ -486,7 +486,7 @@ reflex/constants/installer.py,sha256=wzoO_TaXF6N54CKmqpSSzT9QGIPalYn245AtUIIlEY0
|
|
|
486
486
|
reflex/constants/route.py,sha256=9ydQEdlz3YwGmGMHVGz7zA-INoOLtz_xUU2S-WmhZZM,1940
|
|
487
487
|
reflex/constants/style.py,sha256=gSzu0sQEQjW81PekxJnwRs7SXQQVco-LxtVjCi0IQZc,636
|
|
488
488
|
reflex/custom_components/__init__.py,sha256=R4zsvOi4dfPmHc18KEphohXnQFBPnUCb50cMR5hSLDE,36
|
|
489
|
-
reflex/custom_components/custom_components.py,sha256=
|
|
489
|
+
reflex/custom_components/custom_components.py,sha256=v8qe2MD8Z0GelVY4_BBkIJWmLS9VaUrCrzYzc4OwxAE,32037
|
|
490
490
|
reflex/event.py,sha256=tQH1fLdBrTRI150VxiK6SbUBByPQxMNDylaSBYVliYM,26634
|
|
491
491
|
reflex/middleware/__init__.py,sha256=x7xTeDuc73Hjj43k1J63naC9x8vzFxl4sq7cCFBX7sk,111
|
|
492
492
|
reflex/middleware/hydrate_middleware.py,sha256=iXgB_VID2moU9gNpc79TJHGGhQgDH6miT32T_0Ow5tU,1484
|
|
@@ -516,8 +516,8 @@ reflex/utils/types.py,sha256=-OT6RLGOfKnzlArNua7Kld6DLFeUFAasHS5B2RjLqsE,13585
|
|
|
516
516
|
reflex/utils/watch.py,sha256=HzGrHQIZ_62Di0BO46kd2AZktNA3A6nFIBuf8c6ip30,2609
|
|
517
517
|
reflex/vars.py,sha256=LNQkoL58s5Ea4nB8H8N6ZUe24xzuC_4lNpqnDUi50p8,67145
|
|
518
518
|
reflex/vars.pyi,sha256=4sZo25A0nZ5nLhZ_uUnnz8enzBddhBvGmuHZAM2JhU4,5575
|
|
519
|
-
reflex-0.4.
|
|
520
|
-
reflex-0.4.
|
|
521
|
-
reflex-0.4.
|
|
522
|
-
reflex-0.4.
|
|
523
|
-
reflex-0.4.
|
|
519
|
+
reflex-0.4.6a2.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
520
|
+
reflex-0.4.6a2.dist-info/METADATA,sha256=ykHuuwgbmvuPztaNvWN5IkN7hmLNSdL0npexB3NAEhg,11370
|
|
521
|
+
reflex-0.4.6a2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
522
|
+
reflex-0.4.6a2.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
523
|
+
reflex-0.4.6a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|