Reflex

Latest version: v0.6.7

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 14

14.2.13

* bump nextjs version by Lendemor in https://github.com/reflex-dev/reflex/pull/3992

Miscellaneous

* [ENG-3717] [flexgen] Initialize app from refactored code by masenf in https://github.com/reflex-dev/reflex/pull/3918
* Added fill color for progress by wassafshahzad in https://github.com/reflex-dev/reflex/pull/3926
* Use tailwind typography plugin by default by minimav in https://github.com/reflex-dev/reflex/pull/3593
* disable prose by default for rx.html by adhami3310 in https://github.com/reflex-dev/reflex/pull/4001
* use `class_name="prose"` to enable default formatting for `rx.html`
* allow link as metatags by Lendemor in https://github.com/reflex-dev/reflex/pull/3980
* allow classname to be state vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/3991
* default on_submit in form set to prevent_default by Lendemor in https://github.com/reflex-dev/reflex/pull/4005

Bug Fixes

* [ENG-3824]Make AI template use light mode by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3963
* don't camel case keys of dicts in style by adhami3310 in https://github.com/reflex-dev/reflex/pull/3982
* add missing message when running in backend_only by Lendemor in https://github.com/reflex-dev/reflex/pull/4002
* [ENG-3849] Track backend-only vars that are declared without a default value by masenf in https://github.com/reflex-dev/reflex/pull/4016
* improve lifespan typecheck and debug by Lendemor in https://github.com/reflex-dev/reflex/pull/4014

Documentation

* fix: Adding in-line comments for the segmented control: value and on_change by elviskahoro in https://github.com/reflex-dev/reflex/pull/3933
* fix: Adding code comments for segmented control type by elviskahoro in https://github.com/reflex-dev/reflex/pull/3935

Other Changes

* add some unit tests for coverage by Lendemor in https://github.com/reflex-dev/reflex/pull/3947
* always print passed_type by adhami3310 in https://github.com/reflex-dev/reflex/pull/3950
* remove unused badge by Lendemor in https://github.com/reflex-dev/reflex/pull/3955
* add some more tests by Lendemor in https://github.com/reflex-dev/reflex/pull/3965
* use svg elements instead of raw html for logo by Lendemor in https://github.com/reflex-dev/reflex/pull/3978
* bump to 0.6.1 for further dev by masenf in https://github.com/reflex-dev/reflex/pull/3995
* reorganize all tests in a single top folder by Lendemor in https://github.com/reflex-dev/reflex/pull/3981
* Update markdown component map to use new rx.code_block.theme enum by masenf in https://github.com/reflex-dev/reflex/pull/3996
* remove all runtime asserts by Lendemor in https://github.com/reflex-dev/reflex/pull/4019

New Contributors
* minimav made their first contribution in https://github.com/reflex-dev/reflex/pull/3593
* LeoGrosjean made their first contribution in https://github.com/reflex-dev/reflex/pull/4004

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.0...v0.6.1

3.0

* `rx.spinner` - new component for indeterminate loading
* `rx.skeleton` - new component for placeholder loading
* `loading` prop available for
* `rx.button`
* `rx.icon_button`
* `rx.spinner` and `rx.skeleton` -- use `loading=State.is_loading` instead of using `rx.cond`
* `rx.data_list` - new component for showing key value pairs
* `rx._x.progress` - experimental radix themes progress component, supports `duration` for indeterminate progress.

Radix 3.0 by Lendemor in https://github.com/reflex-dev/reflex/pull/3159

New Public API for wrapping Components

To make wrapping components easier and less error prone, the following functions should be overridden when wrapping components:

* `add_style` - return an `rx.style.Style` for default component styles
* `add_imports` - return a dictionary of `{"library-name0.5.0": {"tag1", "tag2", "tag3"}}` of required imports -- it will automatically be merged with the other component imports.
* `add_hooks` - return a list of javascript snippets that will go inside the component function -- it will be deduped automatically with any other hooks
* `add_custom_code` - return a list of javascript snippets that will go inside the module for each page the component is included in.

With these new methods, Reflex will internally call them for each parent class your component inherits from, so there is no need to call `super().add_*` or do any merging yourself.

* [REF-2523] Implement new public Component API by masenf in https://github.com/reflex-dev/reflex/pull/3203
* add_style api by Lendemor in https://github.com/reflex-dev/reflex/pull/3202

`State.setvar(var_name, value)`

A less magic version of the automatic `State.set_x` setter functions which accept the `var_name` as a string.

* [REF-2273] Implement .setvar special EventHandler by masenf in https://github.com/reflex-dev/reflex/pull/3163

Experimental Toast Component

python
def try_some_toast():
return rx.fragment(
rx.button("🥂", on_click=rx._x.toast.info("Cheers"), variant="outline"),
rx._x.toast.provider(),
)


* add toast component by Lendemor in https://github.com/reflex-dev/reflex/pull/3186
Generic `.throttle` and `.debounce` for all Event types

python
class ThrottleState(rx.State):
last_event: datetime.datetime = datetime.datetime.now()

def handle_mouse_move(self):
self.last_event = datetime.datetime.now()

def throttle_example():
return rx.box(
ThrottleState.last_event,
background_color=rx.color("red", 7),
width="500px",
height="500px",
on_mouse_move=ThrottleState.handle_mouse_move.throttle(500), one event every 500ms
)


* Implement `throttle` and `debounce` as event actions by masenf in https://github.com/reflex-dev/reflex/pull/3091

`rx.container` new prop `stack_children_full_width`

For a nice streamlit-like wide layout, use the following snippet:

python
def index():
return rx.container(
rx.vstack(content()),
stack_children_full_width=True,
)


This will cause all vstack/hstack children and most stack child components to have `width="100%"` automatically, which provides a nice aesthetic for many apps without applying CSS to individual components.

* [REF-2574] Default width for Stack (+children) and default padding for container by masenf in https://github.com/reflex-dev/reflex/pull/3104

Improvements

Unify on `ruff-format`
* ruff-format: unify Black with Ruff `v0.1` by Borda in https://github.com/reflex-dev/reflex/pull/2837
* sync ruff version in pyproject.toml with the precommit one by Lendemor in https://github.com/reflex-dev/reflex/pull/3150

Error Messages
* [REF-2636]Improve Error message for unsupported event trigger by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3147
* prevent shadowing by Lendemor in https://github.com/reflex-dev/reflex/pull/3221
* Better error when a computed var has the same name as an existing state var.
* [REF-2643]Throw Errors for duplicate Routes by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3155
* [REF-2622]Throw warning for incompatible uvicorn version on windows by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3246

`rx.color_mode` changes

* `rx.color_mode.button` now has built in positioning prop for floating button
* IconButton for color_mode with nice default and a position props to control it by Lendemor in https://github.com/reflex-dev/reflex/pull/3165

Default style for `rx.upload`

* Refactor upload component and add styled upload component by Ifechukwu001 in https://github.com/reflex-dev/reflex/pull/3035

Use Alembic Batch Mode for `reflex db makemigrations`

This improves compatibility with the default sqlite database when re-typing columns.

* [REF-2658] Alembic should use batch mode for autogenerate by masenf in https://github.com/reflex-dev/reflex/pull/3223

README
* add color dalle code example by tgberkeley in https://github.com/reflex-dev/reflex/pull/3108
* a little correction in the "es" docs by JLDev-coder in https://github.com/reflex-dev/reflex/pull/3127
* Add Japanese README.md file by PeterYusuke in https://github.com/reflex-dev/reflex/pull/3234

Miscellaneous

* add default underline for links by Lendemor in https://github.com/reflex-dev/reflex/pull/3148
* Expose `color_scheme` on TabsTrigger by masenf in https://github.com/reflex-dev/reflex/pull/3112
* update blank template by Lendemor in https://github.com/reflex-dev/reflex/pull/3219
* Clean up config and app API by picklelo in https://github.com/reflex-dev/reflex/pull/3197
* Fixed unused kwargs in reflex.App by Snaipergelka in https://github.com/reflex-dev/reflex/pull/3170
* Now able to pass a custom `SocketIO` instance

Bugfixes

* [REF-2587] Ignore top-level theme appearance by masenf in https://github.com/reflex-dev/reflex/pull/3119
* avoids "flickering" when the top-level appearance differs from user selected mode
* [REF-2619] Re-init when the template is out of date by masenf in https://github.com/reflex-dev/reflex/pull/3121
* Fixed app name validation by Snaipergelka in https://github.com/reflex-dev/reflex/pull/3146
* extend rx.input allowed types by Lendemor in https://github.com/reflex-dev/reflex/pull/3149
* [REF-2682] Foreach over dict uses Tuple arg value by masenf in https://github.com/reflex-dev/reflex/pull/3160
* Improve nested foreach when dict has complex values
* Update CodeBlock class to accept rx.color in custom_style by khhan0130 in https://github.com/reflex-dev/reflex/pull/3168
* Windows `--frontend-only` fix ctrl + c by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3181
* [REF-2676][REF-2751]Windows Skip ARM devices on bun install + Telemetry by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3212
* icon_button: Icon size should be specified as int pixels, not str by masenf in https://github.com/reflex-dev/reflex/pull/3247
* copy background task marker by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3255
* Can now define background tasks in a state mixin
* Dynamic NoSSRComponent properly renders in prod mode when using State/event handlers

Dependencies
* Bump bun version to 1.1.5 by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3176
* Windows Pin Bun version by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3192
* Windows Pin Version followup (Use Windows Install Link) by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3193
* [REF-2764] dep update 0.5.0 by masenf in https://github.com/reflex-dev/reflex/pull/3245
* gunicorn 22.0.0 with security fix

Other Changes
* separate DECORATED_PAGES per reflex app by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3102
* fix: args issue in `__init__` of App class by nautics889 in https://github.com/reflex-dev/reflex/pull/3141
* [REF-2620] Fallback to npm (not bun) by masenf in https://github.com/reflex-dev/reflex/pull/3138
* pin macos version for CI by Lendemor in https://github.com/reflex-dev/reflex/pull/3145
* [REF-2618] Send template info in init telemetry event by martinxu9 in https://github.com/reflex-dev/reflex/pull/3153
* Integration testing: Firefox compatibility by masenf in https://github.com/reflex-dev/reflex/pull/3162
* Improved get_attribute_access_type by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3156
* custom component install command to install current project in editable mode by martinxu9 in https://github.com/reflex-dev/reflex/pull/3200
* migrate deprecated redis.close to redis.aclose by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3199
* allow optional props with None default value by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3179
* Allow StatefulComponent to also be rendered via `__str__` by masenf in https://github.com/reflex-dev/reflex/pull/3211
* Improved get_attribute_access_type tests by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3180
* Improved implicit harness app names by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3237
* do not access state `__subclasses__`, prevent issues with AppHarness by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3143
* fix screenshot filenames by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3241
* minor test exp_not_equal fixup by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3256


New Contributors
* nautics889 made their first contribution in https://github.com/reflex-dev/reflex/pull/3141
* Borda made their first contribution in https://github.com/reflex-dev/reflex/pull/2837
* Snaipergelka made their first contribution in https://github.com/reflex-dev/reflex/pull/3146
* Ifechukwu001 made their first contribution in https://github.com/reflex-dev/reflex/pull/3035
* JLDev-coder made their first contribution in https://github.com/reflex-dev/reflex/pull/3127
* khhan0130 made their first contribution in https://github.com/reflex-dev/reflex/pull/3168

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.4.9...v0.5.0

0.6.7

Deprecations

* `app.add_custom_404_page` is deprecated -- use `app.add_page(..., route="/404")` instead.
* `external` prop of `rx.redirect` is renamed to `is_external` for consistency.
* Unify `is_external` prop in `rx.redirect` and `rx.link` by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4389

New Features

`async_db_url` and `rx.asession`

Builtin support for async database operations using sqlmodel. Proper usage requires the following:

1. Install `greenlet` for sqlalchemy to use async operations.
2. Install an appropriate async-capable database driver (aiosqlite, pyscopg)
3. Set `ASYNC_DB_URL` in the environment that references the async db driver. This should point to the same database as specified in `DB_URL`, which should still be set for handling alembic migrations and for use in computed vars, etc.
4. Use `async with rx.asession() as asession` -- await most operations on the asession.

Async DB operations are preferred in event handlers to avoid blocking other users on the server.

Var Operations for `datetime` values

* add datetime var comparison operations by Lendemor in https://github.com/reflex-dev/reflex/pull/4406

[Wrapping React] new `deps` and `position` fields in `VarData`

This allows for customization and control of where hooks are rendered relative to other hooks and memoized event handlers. Deps allows for specification of vars that memoized event handlers depend on.

* add deps and position field in VarData by Lendemor in https://github.com/reflex-dev/reflex/pull/4518

Improvements

More Efficient Database Connection Pooling

Each time `rx.session` was used, it was creating a new pool and not reusing connections.

* Reuse the sqlalchemy engine once it's created by masenf in https://github.com/reflex-dev/reflex/pull/4493

Linting
* enable RUF rules by Lendemor in https://github.com/reflex-dev/reflex/pull/4465
* enable FURB rules by Lendemor in https://github.com/reflex-dev/reflex/pull/4466
* add ERA rules to detect commented out code by Lendemor in https://github.com/reflex-dev/reflex/pull/4472
* enable C4 rule by Lendemor in https://github.com/reflex-dev/reflex/pull/4536
* enable PTH rule by Lendemor in https://github.com/reflex-dev/reflex/pull/4476
* enable PERF rules by Lendemor in https://github.com/reflex-dev/reflex/pull/4469
* style: prefer type() over __class__ by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4512

Performance
* minor pickle improvement by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4499
* Avoid double JSON encode/decode for socket.io by masenf in https://github.com/reflex-dev/reflex/pull/4449
* [ENG-4194] TypeError: Cannot create property 'token' on string by masenf in https://github.com/reflex-dev/reflex/pull/4534
* simplify redis code, less redis calls by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4456

Miscellaneous

* Avoid `set_log_level` foot gun by masenf in https://github.com/reflex-dev/reflex/pull/4422
* [HOS-333] Send a "reload" message to the frontend after state expiry by masenf in https://github.com/reflex-dev/reflex/pull/4442
* enable css props via wrapperStyle for recharts components by Lendemor in https://github.com/reflex-dev/reflex/pull/4447
* add default value for text area by Lendemor in https://github.com/reflex-dev/reflex/pull/4462
* add `__repr__` method to MutableProxy by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4506
* [ENG-4135]Default `rx.link` href to `` so `underline` prop works by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4509
* raise StateSerializationError if the state cannot be serialized by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4453
* disable polling by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4441
* deprecate add_custom_404_page by Lendemor in https://github.com/reflex-dev/reflex/pull/4505
* [ENG-4100]Throw warnings when Redis lock is held for more than the allowed threshold by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4522
* Wrap Checkbox component in Context Menu (partial fix for 4262) by vydpnguyen in https://github.com/reflex-dev/reflex/pull/4479
* Include step attribute in input by Joodith in https://github.com/reflex-dev/reflex/pull/4073
* improve StateManagerRedis error message by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4444

Bug Fixes

* [ENG-4137] Handle generic alias passing inspect.isclass check by masenf in https://github.com/reflex-dev/reflex/pull/4427
* fix mutable default in EventNamespace by Lendemor in https://github.com/reflex-dev/reflex/pull/4420
* fix: state size was not checked for dill by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4431
* allow for 'go.Figure | None' annotation in State by Lendemor in https://github.com/reflex-dev/reflex/pull/4426
* follow up to 4426 by Lendemor in https://github.com/reflex-dev/reflex/pull/4436
* rx.upload must include _var_data from props by masenf in https://github.com/reflex-dev/reflex/pull/4463
* fix: multiple mismatched-type-assignment fixes by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4482
* fix: migrate is_backend_only (deprecated) to EnvironmentVariables by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4495
* Fix REFLEX_COMPILE_PROCESSES=0 by masenf in https://github.com/reflex-dev/reflex/pull/4523
* client_state: create Var from value when pushing from backend by masenf in https://github.com/reflex-dev/reflex/pull/4474
* fix: handle default_factory in get_attribute_access_type by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4517
* [ENG-4165] Consider default and default_factory for state vars by masenf in https://github.com/reflex-dev/reflex/pull/4510
* Fix upload cancellation by masenf in https://github.com/reflex-dev/reflex/pull/4527
* [ENG-4153]Use empty string for None values in `rx.input` and `rx.el.input` by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4521
* [ENG-3583] Respect cors_allowed_origins for backend HTTP requests by masenf in https://github.com/reflex-dev/reflex/pull/4533

Documentation
* Add production-one-port example by masenf in https://github.com/reflex-dev/reflex/pull/4489
* add issues templates by Lendemor in https://github.com/reflex-dev/reflex/pull/4455
* [HOS-466]Fix deploy help text by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4508

Version Bumps
* bump ruff to 0.8 and relock poetry by Lendemor in https://github.com/reflex-dev/reflex/pull/4451

Other Changes
* Remove invitation code logic from reflex logoutv2 by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4433
* test dynamic route flakiness (can't reproduce locally) by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4496
* add test for color mode (initial and toggle) by Lendemor in https://github.com/reflex-dev/reflex/pull/4467
* Support python 3.13 by Lendemor in https://github.com/reflex-dev/reflex/pull/4206
* bump CI runners to `macos-latest` by masenf in https://github.com/reflex-dev/reflex/pull/4526
* raise_console_error during integration tests by masenf in https://github.com/reflex-dev/reflex/pull/4535

New Contributors
* vydpnguyen made their first contribution in https://github.com/reflex-dev/reflex/pull/4479
* Joodith made their first contribution in https://github.com/reflex-dev/reflex/pull/4073

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.6.post3...v0.6.7

0.6.6.post3

fix non-interactive flag in deploy command by Lendemor in 4498

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.6.post2...v0.6.6.post3

0.6.6.post2

Fixup stray `loginv2` command in help text

This should have been removed in 0.6.6.post1, but it was missed

0.6.6.post1

Update CLI for Reflex Cloud hosting

* remove v2 commands (4478)
* [HOS-373][HOS-372]Logout should not open the browser (4475)
* [ENG-4149] require login to deploy named templates (4450)

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.6...v0.6.6.post1

Page 1 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.