reflex 0.8.9a1__py3-none-any.whl → 0.8.9a2__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.

@@ -518,6 +518,7 @@ LUCIDE_ICON_LIST = [
518
518
  "chevrons_up_down",
519
519
  "chevrons_up",
520
520
  "chrome",
521
+ "chromium",
521
522
  "church",
522
523
  "cigarette_off",
523
524
  "cigarette",
@@ -1263,11 +1264,13 @@ LUCIDE_ICON_LIST = [
1263
1264
  "panel_left_close",
1264
1265
  "panel_left_dashed",
1265
1266
  "panel_left_open",
1267
+ "panel_left_right_dashed",
1266
1268
  "panel_left",
1267
1269
  "panel_right_close",
1268
1270
  "panel_right_dashed",
1269
1271
  "panel_right_open",
1270
1272
  "panel_right",
1273
+ "panel_top_bottom_dashed",
1271
1274
  "panel_top_close",
1272
1275
  "panel_top_dashed",
1273
1276
  "panel_top_open",
reflex/config.py CHANGED
@@ -267,9 +267,12 @@ _PLUGINS_ENABLED_BY_DEFAULT = [
267
267
 
268
268
  @dataclasses.dataclass(kw_only=True, init=False)
269
269
  class Config(BaseConfig):
270
- """The config defines runtime settings for the app.
270
+ """Configuration class for Reflex applications.
271
271
 
272
- By default, the config is defined in an `rxconfig.py` file in the root of the app.
272
+ The config defines runtime settings for your app including server ports, database connections,
273
+ frontend packages, and deployment settings.
274
+
275
+ By default, the config is defined in an `rxconfig.py` file in the root of your app:
273
276
 
274
277
  ```python
275
278
  # rxconfig.py
@@ -277,14 +280,38 @@ class Config(BaseConfig):
277
280
 
278
281
  config = rx.Config(
279
282
  app_name="myapp",
280
- api_url="http://localhost:8000",
283
+ # Server configuration
284
+ frontend_port=3000,
285
+ backend_port=8000,
286
+ # Database
287
+ db_url="postgresql://user:pass@localhost:5432/mydb",
288
+ # Additional frontend packages
289
+ frontend_packages=["react-icons"],
290
+ # CORS settings for production
291
+ cors_allowed_origins=["https://mydomain.com"],
281
292
  )
282
293
  ```
283
294
 
284
- Every config value can be overridden by an environment variable with the same name in uppercase and a REFLEX_ prefix.
285
- For example, `db_url` can be overridden by setting the `REFLEX_DB_URL` environment variable.
295
+ ## Environment Variable Overrides
296
+
297
+ Any config value can be overridden by setting an environment variable with the `REFLEX_`
298
+ prefix and the parameter name in uppercase:
299
+
300
+ ```bash
301
+ REFLEX_DB_URL="postgresql://user:pass@localhost/db" reflex run
302
+ REFLEX_FRONTEND_PORT=3001 reflex run
303
+ ```
304
+
305
+ ## Key Configuration Areas
306
+
307
+ - **App Settings**: `app_name`, `loglevel`, `telemetry_enabled`
308
+ - **Server**: `frontend_port`, `backend_port`, `api_url`, `cors_allowed_origins`
309
+ - **Database**: `db_url`, `async_db_url`, `redis_url`
310
+ - **Frontend**: `frontend_packages`, `react_strict_mode`
311
+ - **State Management**: `state_manager_mode`, `state_auto_setters`
312
+ - **Plugins**: `plugins`, `disable_plugins`
286
313
 
287
- See the [configuration](https://reflex.dev/docs/getting-started/configuration/) docs for more info.
314
+ See the [configuration docs](https://reflex.dev/docs/advanced-onboarding/configuration) for complete details on all available options.
288
315
  """
289
316
 
290
317
  # Track whether the app name has already been validated for this Config instance.
reflex/utils/types.py CHANGED
@@ -857,6 +857,10 @@ def is_valid_var_type(type_: type) -> bool:
857
857
  if is_union(type_):
858
858
  return all(is_valid_var_type(arg) for arg in get_args(type_))
859
859
 
860
+ if is_literal(type_):
861
+ types = {type(value) for value in get_args(type_)}
862
+ return all(is_valid_var_type(type_) for type_ in types)
863
+
860
864
  type_ = origin if (origin := get_origin(type_)) is not None else type_
861
865
 
862
866
  return (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reflex
3
- Version: 0.8.9a1
3
+ Version: 0.8.9a2
4
4
  Summary: Web apps in pure Python.
5
5
  Project-URL: homepage, https://reflex.dev
6
6
  Project-URL: repository, https://github.com/reflex-dev/reflex
@@ -5,7 +5,7 @@ reflex/admin.py,sha256=Nbc38y-M8iaRBvh1W6DQu_D3kEhO8JFvxrog4q2cB_E,434
5
5
  reflex/app.py,sha256=PaoBHbIRPHAf5_nfEcRKDmANi77LTJfq5xuJZIUBCCU,77932
6
6
  reflex/assets.py,sha256=l5O_mlrTprC0lF7Rc_McOe3a0OtSLnRdNl_PqCpDCBA,3431
7
7
  reflex/base.py,sha256=Oh664QL3fZEHErhUasFqP7fE4olYf1y-9Oj6uZI2FCU,1173
8
- reflex/config.py,sha256=5cZYSdy5OwgEPt_jN2F3n-lJtp82vtKe3gRo5U88cwE,20234
8
+ reflex/config.py,sha256=LsHAtdH4nkSn3q_Ie-KNdOGdflLXrFICUQov29oFjVk,21229
9
9
  reflex/environment.py,sha256=7tfEPpUbelmOZ2B9zlqk0rgfHNkvz_HspGRIpod_AIQ,23126
10
10
  reflex/event.py,sha256=0VHquGHwqfvsEFExJn8m1YFSaE__pg1j58Q8hOgiVmA,74797
11
11
  reflex/model.py,sha256=l1-6fm7NHRFWH-xK9oV9UzAVfvKeUXG1f-tCrF7vmfI,19403
@@ -46,7 +46,7 @@ reflex/compiler/templates.py,sha256=91LCzfwCG_VdqZEEG9vXoYA7SVZvTYTXVlkBuL-zEa8,
46
46
  reflex/compiler/utils.py,sha256=FM1KCuFMfcjveLmQAmwNMp6dTtaqhG3m2opo7rZs_iA,19158
47
47
  reflex/components/__init__.py,sha256=eWpgWFbSQDj2TpGp6StEbxU7roQgzY7ZM0XIcIc5RE8,588
48
48
  reflex/components/__init__.pyi,sha256=7VFHtJGIjvGtD3IiPk848IPWYSCcPRT1EyPGljLhYlU,736
49
- reflex/components/component.py,sha256=FyMOzTjVzwQCjy4Ppq4YyW7qDnuFhMrbZUBwVPoNU2o,99249
49
+ reflex/components/component.py,sha256=64p7eWhFg6Q9ZikvPX9pOYNjQk9GUElwXaf2qUAJACc,98103
50
50
  reflex/components/dynamic.py,sha256=WfN1waxtRuuZ3-8MvooDi4SkFxem4R8wAHOLXx_9rCo,7422
51
51
  reflex/components/field.py,sha256=j5JZFzNlET3GAIW91m1L31RypXylMAxJNm0-CJbtykM,5745
52
52
  reflex/components/literals.py,sha256=hogLnwTJxFJODIvqihg-GD9kFZVsEBDoYzaRit56Nuk,501
@@ -93,7 +93,7 @@ reflex/components/core/html.pyi,sha256=yDzRQ10yf8ZzbP76C2rEG2gx6Vud_Ez3LcHDWMgyF
93
93
  reflex/components/core/match.py,sha256=xBB9vtWgVlotPHq6ssng8lzxwXDDQLp9k6Ew5RPPd3U,9888
94
94
  reflex/components/core/responsive.py,sha256=ACZdtJ4a4F8B3dm1k8h6J2_UJx0Z5LDB7XHQ2ty4wAc,1911
95
95
  reflex/components/core/sticky.py,sha256=2B3TxrwG2Rtp_lv1VkMOIF2bqSiT7qYGbqbiZiMKxKY,3856
96
- reflex/components/core/sticky.pyi,sha256=jtxJjHR8eZEq2yKHGr0U16Nof4OpDXMadf1JtA_6ofk,32750
96
+ reflex/components/core/sticky.pyi,sha256=5D-yT0LYs0ewOlUlInU7KCpuz49yKK7dirysUs1C2VI,32908
97
97
  reflex/components/core/upload.py,sha256=b4-ubt4dznL5LDA7UCKNdWcdCX9aLOX2vNFdv4GlRdg,13544
98
98
  reflex/components/core/upload.pyi,sha256=UqfcPGUs8xmnKHKuvqYV7CtOXeF_D1s9ooRe49w6C3E,15757
99
99
  reflex/components/core/window_events.py,sha256=opbuO20zVxt252kQLk49V7cltb_Um2oh7iePeGNJ538,3355
@@ -121,7 +121,7 @@ reflex/components/el/elements/forms.pyi,sha256=NSmo68oksZkzOoSGA5XKNVzqU0K3WIzkF
121
121
  reflex/components/el/elements/inline.py,sha256=q3Ku_x8L9NaXrYQovCfkWwZ5AfXG0VyhGN_OT73kA0Y,4126
122
122
  reflex/components/el/elements/inline.pyi,sha256=0pjqiHH8DmFfghbM8MK5tqgiZGSnfT-o055GINU8xrA,231760
123
123
  reflex/components/el/elements/media.py,sha256=RxykHOcXrTPiInFXfmt_QfGTTNXQez_eurlpaobRoWw,26204
124
- reflex/components/el/elements/media.pyi,sha256=g8stEbHH7qWoK0_x_ffqZRJdmElVmCo0iBekmxMWLJA,240566
124
+ reflex/components/el/elements/media.pyi,sha256=g-IBcwsy4ilzlIHmVn4ZGTTVHf83gqMurCBiImslAH4,442547
125
125
  reflex/components/el/elements/metadata.py,sha256=Vf0D0dXqvwt76FkrvDQQpESJmxDh6e6Qxnk2GIRhOlM,2316
126
126
  reflex/components/el/elements/metadata.pyi,sha256=5pqPOzE-QbjiOQBitX_qWkcrCssotx-VaP-7x62dfjg,39675
127
127
  reflex/components/el/elements/other.py,sha256=WON35QviPNYsBeLQTNbeN7a6m6ixLYIVa4WsDzo9YBY,1378
@@ -139,7 +139,7 @@ reflex/components/gridjs/datatable.py,sha256=7JKrRw1zkpFB0_wwoaIhrVrldsm7-dyi3PA
139
139
  reflex/components/gridjs/datatable.pyi,sha256=kFgv82vCgfdWZaUq4bZ73G8X3mkw6ecvSRkZ9G9-28E,5185
140
140
  reflex/components/lucide/__init__.py,sha256=EggTK2MuQKQeOBLKW-mF0VaDK9zdWBImu1HO2dvHZbE,73
141
141
  reflex/components/lucide/icon.py,sha256=GiNlTfoXE36J9ZAY9Kh7DogxM5jVliFi5VjZZ_8YObM,35292
142
- reflex/components/lucide/icon.pyi,sha256=jCixJQ2PQJ6wXArnKwuqSUZr269cHW72t34d8-f-UdA,38008
142
+ reflex/components/lucide/icon.pyi,sha256=PtN6ysOxDRtwlpt-YsXAKZpKipXmZBtbAt-FaGI6i4Q,38086
143
143
  reflex/components/markdown/__init__.py,sha256=Dfl1At5uYoY7H4ufZU_RY2KOGQDLtj75dsZ2BTqqAns,87
144
144
  reflex/components/markdown/markdown.py,sha256=kzvO2VnfCbxV7AcIMBJbxLtAlQ6U5T_QB_JTh8l-HJ4,15450
145
145
  reflex/components/markdown/markdown.pyi,sha256=oOlXZItHB0TPWsFz1Qjvr3KzG8sssthBp40UO_KkRIA,4322
@@ -370,7 +370,7 @@ reflex/utils/serializers.py,sha256=ZqQ2xrBIyOXaN0RIRZwy2oU5O0Y1R0SEGWx-kf5rXMs,1
370
370
  reflex/utils/telemetry.py,sha256=KY54NmGWyJVSf9TMTcXw2V6gIbEqut1JkAXmmtIlRfw,10776
371
371
  reflex/utils/templates.py,sha256=tWo3jO6laQX8b0gUsqHkio_hUQGIvFbmXC-lxiGcdRo,14251
372
372
  reflex/utils/token_manager.py,sha256=o_HGbqT9WfYRmek2iY9nem4vDZMz8Q4Dra-eW1lKmuA,6999
373
- reflex/utils/types.py,sha256=ijoghzgZXsQetpMtmNPLoOtsy7MmrEDojgOPcHnKmAs,38361
373
+ reflex/utils/types.py,sha256=Xh9jXSMBgwrR-Whn_5qAnjqQWzHiIJbm1b8qwMG4QmY,38511
374
374
  reflex/vars/__init__.py,sha256=85eXMt32bFoKtMdH3KxYRMD8mtnKyYiQcThPxJLoW1k,1359
375
375
  reflex/vars/base.py,sha256=hfcJ3x-BSFLgN85oBS0dPJb2IaoKJqQjguP1sy50NRY,113256
376
376
  reflex/vars/datetime.py,sha256=F2Jv_bfydipFSkIQ1F6x5MnSgFEyES9Vq5RG_uGH81E,5118
@@ -380,8 +380,8 @@ reflex/vars/number.py,sha256=tO7pnvFaBsedq1HWT4skytnSqHWMluGEhUbjAUMx8XQ,28190
380
380
  reflex/vars/object.py,sha256=YblDxQYMajR19a7qjavXcM7-9A6MweAH1giw5fjPci4,17349
381
381
  reflex/vars/sequence.py,sha256=1kBrqihspyjyQ1XDqFPC8OpVGtZs_EVkOdIKBro5ilA,55249
382
382
  scripts/hatch_build.py,sha256=-4pxcLSFmirmujGpQX9UUxjhIC03tQ_fIQwVbHu9kc0,1861
383
- reflex-0.8.9a1.dist-info/METADATA,sha256=XfDIidbOb-0BzG0x15FVJnz8lyx3Y0q6cclQ5mOFoyY,12507
384
- reflex-0.8.9a1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
385
- reflex-0.8.9a1.dist-info/entry_points.txt,sha256=Rxt4dXc7MLBNt5CSHTehVPuSe9Xqow4HLX55nD9tQQ0,45
386
- reflex-0.8.9a1.dist-info/licenses/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
387
- reflex-0.8.9a1.dist-info/RECORD,,
383
+ reflex-0.8.9a2.dist-info/METADATA,sha256=xOp7-o3Rakin_ji0pTLZieiQ50RC99Xh0sf-Fy8pdj8,12507
384
+ reflex-0.8.9a2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
385
+ reflex-0.8.9a2.dist-info/entry_points.txt,sha256=Rxt4dXc7MLBNt5CSHTehVPuSe9Xqow4HLX55nD9tQQ0,45
386
+ reflex-0.8.9a2.dist-info/licenses/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
387
+ reflex-0.8.9a2.dist-info/RECORD,,