Reflex

Latest version: v0.7.0

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

Scan your dependencies

Page 2 of 15

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

0.6.6

New Features

`.temporal` event action drops events when backend is not connected

* New Event Action: temporal by masenf in https://github.com/reflex-dev/reflex/pull/4404

New "performance mode" options

Allow disabling or modifying various guardrails and checks performed by reflex.

* implement performance mode for existing state size check by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4392

Builtin support for existing pydantic v1 and v2 models

State vars can now be typed as pydantic models, with support for modification tracking.

* [ENG-3953] Support pydantic BaseModel (v1 and v2) as state var by masenf in https://github.com/reflex-dev/reflex/pull/4338

`rx.asset` promoted to non-experimental

TBD: docs for new API

* rx._x.asset improvements by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3624

Improvements

Streamlined `reflex init` workflow

* [GTM-836]Rework Init workflow by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4377

Other Improvements
* export Color and ImportDict in top-level namespace by masenf in https://github.com/reflex-dev/reflex/pull/4352
* redesign error boundary screen by adhami3310 in https://github.com/reflex-dev/reflex/pull/4329
* add typing to function vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/4372
* Add template name to reflex init success msg by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4349
* Fix ternary logic when printing template name by masenf in https://github.com/reflex-dev/reflex/pull/4393
* fix: do not allow instantiation of State mixins by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4347
* add typed dict type checking by adhami3310 in https://github.com/reflex-dev/reflex/pull/4340
* Add datetime to moment by Alek99 in https://github.com/reflex-dev/reflex/pull/4381
* remove deprecation for drawer events by Lendemor in https://github.com/reflex-dev/reflex/pull/4415
* allow to disable checking for the latest package version via env by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4407
* Allow bound method as event handler by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4348
* enable css props via wrapperStyle for recharts components by Lendemor in 4447

Bug Fixes
* fix upload argspec being missing by adhami3310 in https://github.com/reflex-dev/reflex/pull/4335
* Only pass Model.__fields__ when casting event args by masenf in https://github.com/reflex-dev/reflex/pull/4356
* Path change after Astral 0.5.0 update by 1Codev in https://github.com/reflex-dev/reflex/pull/4336
* [ENG-4098] Deconfuse key/value of State.get_value / dict / get_delta by masenf in https://github.com/reflex-dev/reflex/pull/4371
* fix noSSRComponent imports by Lendemor in https://github.com/reflex-dev/reflex/pull/4386
* fix: Failed to CreateArtifact by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4339
* make list suggestions work in rx.input by Lendemor in https://github.com/reflex-dev/reflex/pull/4391
* Don't skip serialization when Var is callable by masenf in https://github.com/reflex-dev/reflex/pull/4399
* ignore rxconfig not in cwd by adhami3310 in https://github.com/reflex-dev/reflex/pull/4398
* protect sys.path manipulation with a mutex by masenf in https://github.com/reflex-dev/reflex/pull/4408
* fix appearance broken by 3812 by Lendemor in https://github.com/reflex-dev/reflex/pull/4403
* [ENG-4130] Disable typer/rich integration appropriately by masenf in https://github.com/reflex-dev/reflex/pull/4412
* [HOS-313] state.js: when a routing error occurs, delete it by masenf in https://github.com/reflex-dev/reflex/pull/4410
* fix for event handlers in py3.9 by Lendemor in https://github.com/reflex-dev/reflex/pull/4416
* Handle Var passed to `rx.toast` by masenf in https://github.com/reflex-dev/reflex/pull/4405
* allow for 'go.Figure | None' annotation in State by Lendemor in 4426
* cb087acbe follow up to 4426 (4436)
* fix mutable default in EventNamespace by Lendemor in 4420
* [ENG-4137] Handle generic alias passing inspect.isclass check by masenf in 4427
* [HOS-333] Send a "reload" message to the frontend after state expiry by masenf in 4442
* rx.upload must include _var_data from props by masenf in 4463

Version Bumps
* Bump reflex-hosting-cli dep to 0.1.15 for v2 by masenf in https://github.com/reflex-dev/reflex/pull/4355
* Temporarily downpin radix-ui/themes <3.1.5 by masenf in https://github.com/reflex-dev/reflex/pull/4370
* require typing_extensions >= 4.6.0 by masenf in https://github.com/reflex-dev/reflex/pull/4373
* update cli version by Kastier1 in https://github.com/reflex-dev/reflex/pull/4394
* [maintenance] bump some packages versions by Lendemor in https://github.com/reflex-dev/reflex/pull/4385
* [ENG-4080]Downgrade syntax highlighter to fix `wrapLongLines` issue by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4368
* Simon/hosting cli upgrades by Kastier1 in https://github.com/reflex-dev/reflex/pull/4417

Other Changes

* Update bug_report.md by Alek99 in https://github.com/reflex-dev/reflex/pull/4382
* add debug statement to evaluate page by adhami3310 in https://github.com/reflex-dev/reflex/pull/4396
* Remove invitation code logic from reflex logoutv2 ElijahAhianyo in 4433

New Contributors
* 1Codev made their first contribution in https://github.com/reflex-dev/reflex/pull/4336

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

0.6.5

Known Issues

* 4384 Setting the default `appearance` prop in `rx.theme` is no longer working

Breaking Changes

* `rx.App` is now a dataclass that does not accept additional kwargs. Any unrecognized kwargs passed to `rx.App` will now raise an exception.
* Event handlers that accept annotated `rx.Base` subclasses as arguments will receive an instance of the annotated class instead of a regular `dict`

New Features

New `rx.get_state` interface

* expose rx.get_state() to get instance of state from anywhere by Lendemor in https://github.com/reflex-dev/reflex/pull/3959

Support custom `bunfig.toml`

* allow custom bunfig.toml file by Lendemor in https://github.com/reflex-dev/reflex/pull/4280

New Hosting Service CLI

* Adding hosting v1 support by Kastier1 in https://github.com/reflex-dev/reflex/pull/4309
* update cli version by Kastier1 in https://github.com/reflex-dev/reflex/pull/4333

Improvements

Better Typing Support
* add type validation for state setattr by adhami3310 in https://github.com/reflex-dev/reflex/pull/4265
* handle none case in state setattr by adhami3310 in https://github.com/reflex-dev/reflex/pull/4301
* use better typing for on_load by adhami3310 in https://github.com/reflex-dev/reflex/pull/4274
* [ENG-3943]type check for event handler if spec arg are typed by Lendemor in https://github.com/reflex-dev/reflex/pull/4046
* add noop event by adhami3310 in https://github.com/reflex-dev/reflex/pull/4288
* allow for event handlers to ignore args by adhami3310 in https://github.com/reflex-dev/reflex/pull/4282
* improve typing for non decorated events by adhami3310 in https://github.com/reflex-dev/reflex/pull/4308
* add type hinting for plotly by adhami3310 in https://github.com/reflex-dev/reflex/pull/4279
* unbreak pyi plotly by adhami3310 in https://github.com/reflex-dev/reflex/pull/4320
* improve app_src typing by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4324
* change custom attr to accept any by adhami3310 in https://github.com/reflex-dev/reflex/pull/4323
* improve typing for serializer decorator by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4317
* [ENG-3793] convert event return types to type hints by adhami3310 in https://github.com/reflex-dev/reflex/pull/4331

Experimental Shiki Code Block Features
* [ENG-3892]Shiki codeblock support decorations by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4234
* [ENG-4010]Codeblock cleanup in markdown by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4233

Refactor Environment Variable Handling
* More env var cleanup by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4248

Other Improvements
* Support `locale` prop in `rx.moment` by masenf in https://github.com/reflex-dev/reflex/pull/4229
* delay page until _compile gets called by adhami3310 in https://github.com/reflex-dev/reflex/pull/3812
* fix stateful components on delayed evaluation by adhami3310 in https://github.com/reflex-dev/reflex/pull/4247
* make vardata merge not use classmethod by adhami3310 in https://github.com/reflex-dev/reflex/pull/4245
* port enum env var support from 4248 by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4251
* expose staticPageGenerationTimeout by adhami3310 in https://github.com/reflex-dev/reflex/pull/4266
* rx.event(background=True) by adhami3310 in https://github.com/reflex-dev/reflex/pull/4263
* components as literal vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/4223
* generate docs for event handlers by adhami3310 in https://github.com/reflex-dev/reflex/pull/4277
* improve page title default by adhami3310 in https://github.com/reflex-dev/reflex/pull/4278
* Add option to scroll to bottom by picklelo in https://github.com/reflex-dev/reflex/pull/4276
* [ENG-759] [ENG-1104] patch `json.dumps` to handle `__wrapped__` objects by masenf in https://github.com/reflex-dev/reflex/pull/4166
* Support direct usage of `MutableProxy` wrapped objects in JSON APIs (OpenAI, httpx, etc)
* improve object var symantics by adhami3310 in https://github.com/reflex-dev/reflex/pull/4290
* add metainfo to keyevent by adhami3310 in https://github.com/reflex-dev/reflex/pull/4287

Bug Fixes
* Include value._get_all_var_data when ClientStateVar.set_value is used by masenf in https://github.com/reflex-dev/reflex/pull/4161
* client_state: fix fault VarData.merge call by masenf in https://github.com/reflex-dev/reflex/pull/4244
* Remove Duplicated 'gray' colour from ColorType by lb803 in https://github.com/reflex-dev/reflex/pull/4249
* Handle props annotated as list/dict of EventHandler by masenf in https://github.com/reflex-dev/reflex/pull/4257
* add existing path subclass for env checks by adhami3310 in https://github.com/reflex-dev/reflex/pull/4260
* [ENG-4012]Fix shiki copy button animation firing off after clicking copy button by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4252
* [ENG-4013] Catch more exceptions for dill pickle fallback by masenf in https://github.com/reflex-dev/reflex/pull/4270
* fix typo in dataeditor prop by adhami3310 in https://github.com/reflex-dev/reflex/pull/4281
* Bugfix/leave gitignore as is by grahamannett in https://github.com/reflex-dev/reflex/pull/4291
* Fix wrong hook by abulvenz in https://github.com/reflex-dev/reflex/pull/4295
* fix call_function events sent from backend by adhami3310 in https://github.com/reflex-dev/reflex/pull/4316
* fix imports with alias from $ by adhami3310 in https://github.com/reflex-dev/reflex/pull/4332
* Only pass Model.__fields__ when casting event args by masenf in 4356
* fix upload argspec being missing by adhami3310 in 4335

Documentation
* [ENG-4026]change gallery link to Templates by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4283
* [GTM-345]Define component props in class for doc discoverability by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4183
* Update overlay props by tgberkeley in https://github.com/reflex-dev/reflex/pull/4261
* default props comment for GraphinTooltip by carlosabadia in https://github.com/reflex-dev/reflex/pull/4101
* add toast classname prop by carlosabadia in https://github.com/reflex-dev/reflex/pull/4310
* [GTM-648]Add Missing Table props by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4322

Version Bumps
* update nodejs to lts 22 for real this time by adhami3310 in https://github.com/reflex-dev/reflex/pull/4267
* rollback to 14.2.16 until v15 is more stable by Lendemor in https://github.com/reflex-dev/reflex/pull/4297
* bump python packages version by Lendemor in https://github.com/reflex-dev/reflex/pull/4302
* pin marked to correct version by adhami3310 in https://github.com/reflex-dev/reflex/pull/4313
* Bump reflex-hosting-cli dep to 0.1.15 for v2 by masenf in 4355
* Temporarily downpin radix-ui/themes <3.1.5 by masenf in 4370

Other Changes
* convert test_table to use playwright by Lendemor in https://github.com/reflex-dev/reflex/pull/4241
* cleanup dead code by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4271
* unbreak ci lighthouse by adhami3310 in https://github.com/reflex-dev/reflex/pull/4273
* resync steps with task advance by adhami3310 in https://github.com/reflex-dev/reflex/pull/4275
* [ENG-3961] move "warn_if_too_large" logic into BaseState by masenf in https://github.com/reflex-dev/reflex/pull/4284
* raise error when get package manager is not found by adhami3310 in https://github.com/reflex-dev/reflex/pull/4289
* better missing system package message by adhami3310 in https://github.com/reflex-dev/reflex/pull/4306
* move check of path to only check name by adhami3310 in https://github.com/reflex-dev/reflex/pull/4299
* special case field in _isinstance by adhami3310 in https://github.com/reflex-dev/reflex/pull/4298
* bypass pydantic runtime validation for state init by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4256
* add codeowners by Kastier1 in https://github.com/reflex-dev/reflex/pull/4312
* stop ignoring some lint rules by Lendemor in https://github.com/reflex-dev/reflex/pull/4311
* mark var methods as private by adhami3310 in https://github.com/reflex-dev/reflex/pull/4319
* test_exception_handlers: add test case that triggers ErrorBoundary by masenf in https://github.com/reflex-dev/reflex/pull/4327

New Contributors
* lb803 made their first contribution in https://github.com/reflex-dev/reflex/pull/4249
* grahamannett made their first contribution in https://github.com/reflex-dev/reflex/pull/4291

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.4...v0.6.5

0.6.4

New Features

Make Var System Expandable

A new dispatch mechanism for converting python values into Var and LiteralVar subclasses. This allows component authors and downstream applications to better support custom frontend operations on Python values converted to Javascript values

<details>

<summary>See Example</summary>

This example allows for near drop-in support for working with SQLAlchemy `DeclarativeBase` models and will likely be included in a future release:

python
from collections.abc import Mapping, MutableSet, Sequence
from typing import TypeVar
import dataclasses
import sys

import reflex as rx
import sqlalchemy
import sqlalchemy.orm.exc
from sqlalchemy.orm import DeclarativeBase


class DeclarativeBaseVar(rx.vars.ObjectVar, python_types=DeclarativeBase):
pass


dataclasses.dataclass(
eq=False,
frozen=True,
**{"slots": True} if sys.version_info >= (3, 10) else {},
)
class LiteralDeclarativeBaseVar(rx.vars.LiteralObjectVar, DeclarativeBaseVar):
_var_value: DeclarativeBase | None = None


T = TypeVar("T")
K = TypeVar("K")
V = TypeVar("V")


rx.serializer
def serialize_Sequence(s: Sequence[T] | MutableSet[T]) -> list[T]:
return list(s)


rx.serializer
def serialize_Mapping(m: Mapping[K, V]) -> dict[K, V]:
return dict(m)


rx.serializer
def serialize_DeclarativeBase(obj: DeclarativeBase) -> dict[str, str]:
s = {}
for attr in sqlalchemy.inspect(type(obj)).all_orm_descriptors.keys():
try:
s[attr] = getattr(obj, attr)
except sqlalchemy.orm.exc.DetachedInstanceError:
This happens when the relationship was never loaded and the session is closed.
continue
return s


</details>

* make var system expandable by adhami3310 in https://github.com/reflex-dev/reflex/pull/4175

`max-requests` support to gunicorn (fixed memory leak)

This is a new configurable option in the rx.config but also now has default values.
`gunicorn_max_requests` - ( gunicorn / uvicorn )max requests per worker
Defaults value - `100`
`gunicorn_max_requests_jitter` - (gunicorn only) variance in the max request limit. To prevent all workers restarting at same time
Defaults value - `25`

What is `max_requests`?

`max_requests` is a the maximum number of requests a worker can serve before the manager will kill the worker and restart.

Why is this needed?

gunicorn workers don't release memory after a request. This can cause for a workers to hold on to more and more memory over time. Setting this flag means that after serving N requests the worker is killed, thus releasing the memory, and a new worker is spun up.

How to configure

python
rx.config(
...
gunicorn_max_requests=50
...
)


Experimental Shiki Codeblock

python
rx._x.code_block(
"""
print("Original text") [!code --]
print("Replace original with this") [!code ++]

name = "John Doe" [!code highlight]
""",
language="python",
theme="dracula",
use_transformers=True,
can_copy=True,
show_line_numbers=True
)


* [ENG-3848][ENG-3861]Shiki Code block Experimental by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4030

`dotenv` support added

To use this feature, you must install `python-dotenv` separately from reflex.

python
import reflex as rx

config = rx.Config(
app_name="mycoolapp",
env_file=".env",
)


* HOS-93: add support for .env file by Kastier1 in https://github.com/reflex-dev/reflex/pull/4219
* make python-dotenv optional by Lendemor in https://github.com/reflex-dev/reflex/pull/4222

New `rx.dynamic` decorator

Unlike normal UI functions, this decorator allows UI code to directly access State instance values, Python-only APIs, and typical `for` and `if` statements.

<details>

<summary>See Example</summary>

We can implement a simple Reflex fiddle, that evaluates component strings into UI components and render them. This was previously difficult, as all UI had to compile into react code in the `.web` folder. This works by dynamically compiling a JavaScript module using in-window react.

python
import reflex as rx


class State(rx.State):
component_str = "rx.button('login')"


rx.dynamic
def evaluated_component(state: State):
try:
component = eval(
state.component_str,
{
"rx": rx,
"State": State,
},
)
except Exception as e:
return rx.text(f"Error: {e}")
if not isinstance(component, rx.Component):
return rx.text("Invalid component")
return component


def index():
return (
rx.hstack(
rx.text_area(
value=State.component_str,
on_change=State.set_component_str,
height="100%",
flex="1",
),
rx.card(evaluated_component(), height="100%", flex="1"),
height="100vh",
padding="1rem",
box_size="border-box",
),
)


</details>

* implement rx dynamic by adhami3310 in https://github.com/reflex-dev/reflex/pull/4195

Improvements

Better Type Hinting for Built in Components
* add type hinting to error boundary by adhami3310 in https://github.com/reflex-dev/reflex/pull/4182
* add event types to suneditor by adhami3310 in https://github.com/reflex-dev/reflex/pull/4209
* Add type hinting to dataeditor events by adhami3310 in https://github.com/reflex-dev/reflex/pull/4210
* Add on progress typing to react player by adhami3310 in https://github.com/reflex-dev/reflex/pull/4211
* add additional typing for calling events by adhami3310 in https://github.com/reflex-dev/reflex/pull/4218

Other Improvements
* allow setting run mode via env, add helpers to determine it by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4168
* Raise TypeError when `ComputedVar.__init__` gets bad kwargs by masenf in https://github.com/reflex-dev/reflex/pull/4199
* move all environment variables to the same place by adhami3310 in https://github.com/reflex-dev/reflex/pull/4192
* add existing path subclass for env checks by adhami3310 in 4260
* port enum env var support from 4248 by benedikt-bartscher in 4251
* [ENG-3970] When normal pickle fails, try dill by masenf in https://github.com/reflex-dev/reflex/pull/4239

Bug Fixes
* use larger or equal for node version check by adhami3310 in https://github.com/reflex-dev/reflex/pull/4189
* check for none before returning which by adhami3310 in https://github.com/reflex-dev/reflex/pull/4187
* fix and test bug in config env loading by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4205
* fix inverted alembic file check by adhami3310 in https://github.com/reflex-dev/reflex/pull/4238
* fix: async default setters break setvar by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4169
* Fix 'enter_key_submit=True' on 'rx.text_area' by carrying custom_code on debounce by masenf in https://github.com/reflex-dev/reflex/pull/4142
* Handle props annotated as list/dict of EventHandler (4257)

Version Bumps
* upgrade node to latest lts by adhami3310 in https://github.com/reflex-dev/reflex/pull/4191
* versions bump before 0.6.4 by Lendemor in https://github.com/reflex-dev/reflex/pull/4208
* bump ruff to 0.7.0 by Lendemor in https://github.com/reflex-dev/reflex/pull/4213

Other Changes
* pin AppHarness tests to ubuntu-22.04 runner by masenf in https://github.com/reflex-dev/reflex/pull/4173
* Remove demo command by Alek99 in https://github.com/reflex-dev/reflex/pull/4176
* move client storage classes to their own file by Lendemor in https://github.com/reflex-dev/reflex/pull/4216
* use $ syntax by adhami3310 in https://github.com/reflex-dev/reflex/pull/4237
* test for stateless apps by Lendemor in https://github.com/reflex-dev/reflex/pull/3816


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

0.6.3.post1

Post-release fix for hot reload issue `RuntimeError: Cannot populate parent states`

* [ENG-3989] Ensure non-serialized states are present in StateManagerDisk (4230)

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

Page 2 of 15

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.