Skip to content

Releases

reflex-build-sdk@0.1.3a1

Pre-release

Choose a tag to compare

Breaking Changes

  • reflex_build_sdk.triggers no longer accepts HMAC (v1) signatures or reads REFLEX_TRIGGER_SECRET: verify and parse_delivery drop their secret argument, SECRET_ENV is removed, and sign takes whsk_ Ed25519 signing keys only. The platform never sent HMAC-signed deliveries, so no deployed app relied on them.

Features

  • reflex_build_sdk.triggers verifies the platform's Ed25519 (v1a) delivery signatures against the public key in REFLEX_TRIGGER_PUBLIC_KEY, so an app holds nothing that could sign a delivery. Install reflex-build-sdk[triggers] to get the cryptography package it needs. triggers.public_key(signing_key) returns the public half of a whsk_ signing key.

reflex-workflow@0.1.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 22:13
6c294f4

Features

  • start(first, key=Model.column) keys a run on one unique column: False then means exactly "a run with this key already exists", and a clash on any other unique column raises RunConflict, which names the constraint when the database driver reports it. Without key=, start behaves as before. (#7925)

reflex-hosting-cli@0.2.2.post1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 21:17
1df5b64

Miscellaneous

  • Allow reflex-build-sdk 0.1.2. (#7973)

reflex-build-sdk@0.1.2

Choose a tag to compare

@github-actions github-actions released this 23 Nov 21:12
3c01fd2

Features

  • New reflex_build_sdk.triggers module for receiving Reflex Build trigger deliveries: parse_delivery verifies the Standard Webhooks signature against REFLEX_TRIGGER_SECRET and reads the batch, EntryPoints declares the functions that turn an event into a workflow row (and lists them for the platform with manifest()), and reply formats the per-event Result. It uses the standard library only. (#7926)

reflex-site-shared@0.0.51

Choose a tag to compare

@github-actions github-actions released this 23 Nov 21:13
a91a245

Release of reflex-site-shared 0.0.51.

reflex-workflow@0.1.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 17:56
8158ffc

First release. reflex-workflow runs durable workflows on Postgres: each workflow is a SQLAlchemy table, each row is a run, and workers in your app claim due rows and run their steps. Requires Python 3.11 or newer and SQLAlchemy 2.0.20 or newer. The documentation covers defining workflows, running workers, and how the engine works.

Features

  • Define a workflow by mixing Workflow into a SQLAlchemy model and marking methods with @step. A step returns what runs next: another step, wake_in(step, delay), wait_for(step, ...), every(step, schedule), fan_out(children, then=step), or None to stop. @step(retries=N, backoff=...) retries a failing step with doubling backoff.
  • Start and control runs with await Model(...).start(step), Model.by(...).run(step), .deliver(event), and .cancel(). Starting a row that hits a unique constraint starts nothing, so a key never starts two runs.
  • Wait for outside events: a step returns wait_for(step, timeout=..., on_timeout=...) and deliver(step(args), key=...) hands the event to every matching run that is waiting for it. A key makes delivery idempotent, and restart=True lets a finished run take the event by starting again.
  • Run a step on a schedule with every(step, interval) or every(step, Cron("0 9 * * MON-FRI", "America/Los_Angeles")).
  • Fan out with fan_out(children, then=step): the children run as ordinary runs with their own retries, the parent continues when the last one finishes, and self.children(Child) reads them back.
  • Cap concurrency and rate per group with __workflow_limit__ = Limit(by="customer", at_most=3, rate=60, per=timedelta(minutes=1)), counted across every worker. Rates use a table the application maps with RateBucket.
  • Pin steps to dedicated workers with @step(lane="media") and run_workflows(..., lanes=["media"]).
  • Record what each step attempt did by mapping AttemptLog, then read it with await run.history().
  • Set up a process that starts runs and delivers events without running steps with connect_workflows(Session).
  • Workers pick up new runs and events at once through Postgres LISTEN/NOTIFY, with polling as the fallback. run_workflows(on_idle=...) and reflex_workflow.wake(timeout) let a platform wake a deployment that suspends when idle, and run_workflows(suspends_when_idle=True) keeps an idle worker from holding a database such as Neon awake.
  • Models on a MappedAsDataclass base import Workflow, AttemptLog, and RateBucket from reflex_workflow.dataclass instead.
  • Trace every step attempt with OpenTelemetry when reflex-otel is instrumented. Step arguments and row columns are never recorded.

reflex-site-shared@0.0.50

Choose a tag to compare

@github-actions github-actions released this 17 Nov 22:30
ef72a3f

Release of reflex-site-shared 0.0.50.

reflex-components-internal@0.0.35

Choose a tag to compare

@github-actions github-actions released this 17 Nov 22:30
ef72a3f

Release of reflex-components-internal 0.0.35.

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 01:06
46ffe51

Breaking Changes

  • @rx.event now returns an EventHandler instead of the decorated function. A decorator stacked above @rx.event is deprecated: the method still runs and registers under its own name, with a deprecation warning, until 1.0; apply other decorators below @rx.event. @rx.event on a method of a class that is not a state keeps working when called through an instance, and on a staticmethod or classmethod leaves it unchanged; both warn and should be removed, and calling such a method through the class (Helper.compute(obj, 3)) is not supported. A module-level function decorated with @rx.event whose first parameter is not a state stays a plain function and warns; drop the decorator from plain helper functions. Stacking @rx.event twice applies both, with the outer decorator's options winning; applying it to a handler already bound to another state, such as rx.event(OtherState.handler), raises TypeError, so decorate the function instead. (#7673, #7810)

  • deploy_url now defaults to None instead of http://localhost:3000, and in prod mode, when it is unset, the backend no longer sends CORS headers, so browsers cannot read cross-origin responses, and Socket.IO accepts same-origin connections only. With deploy_url set, that origin is allowed in addition to the backend's own. A split frontend and backend, a CDN-served frontend or a proxy that rewrites Host needs REFLEX_DEPLOY_URL set to the frontend's URL on the backend, for example REFLEX_DEPLOY_URL=https://app.example.com reflex run --env prod --backend-only. Previously any origin was allowed. Set cors_allowed_origins explicitly for other setups (["*"] restores the old behavior). Behind proxies, X-Forwarded-Host and X-Forwarded-Proto count only when trusted_proxy_hops is set, and the first rejected origin in each worker logs a warning naming the setting to change. Code that reads config.deploy_url must handle None: use the new config.frontend_url for the frontend's origin (deploy_url when set, http://localhost:<frontend_port> otherwise), or config.api_url when the backend serves the frontend from its own origin (single-port --env prod). (#7641, #7799)

  • A set or frozenset state var is now a SetVar rather than an ArrayVar, so it no longer type-checks as a sequence in frontend code: indexing, slicing, map, filter, join, reverse, +, *, the comparisons <, <=, > and >=, and contains with a field on it are deprecated. They still compile for now with a deprecation warning and will be removed in 1.0. Call .to_array() first:

    State.tags[0]  # deprecated
    State.tags.to_array()[0]
    ``` ([#7642](https://github.com/reflex-dev/reflex/issues/7642))
  • Browser storage vars (rx.Cookie, rx.LocalStorage, rx.SessionStorage) must be declared with a storage value as the default or with a storage type annotation. A default_factory on a storage var, or one returning a storage value, now fails at compile time instead of being silently ignored or treated as an ordinary var. (#7582)

  • Remove the built-in starlette-admin dashboard. rx.AdminDash(...) now raises an error linking to the admin dashboard guide, which shows how to mount starlette-admin yourself with api_transformer. (#7739)

  • Calling an rx.App instance (app()) returns a plain ASGI callable instead of a Starlette app, so the result no longer has add_middleware, routes or mount. Add Starlette middleware and routes with api_transformer instead. (#7624)

  • rx.ModelRegistry.register(Base) is now optional: until a base is registered, reflex db and the alembic command line migrate the tables of every DeclarativeBase subclass defined at module level or in a class body of a module the app imports. A base meant for another database, or one defined by an installed library, then gets create_table in the db_url migrations; register the bases of db_url with rx.ModelRegistry.register(Base) to leave the others out. An autogenerated revision that drops tables now logs a warning naming them. (#7797)

Deprecations

  • reflex.model.alembic_autogenerate, reflex.model.get_migration_history and reflex.model.format_revision, and the rx.Model.alembic_autogenerate and rx.Model.get_migration_history class methods, are deprecated and will be removed in 1.0.0. alembic_autogenerate now runs through the generated alembic/env.py and ignores its connection argument. Use alembic revision --autogenerate, alembic check and alembic history --indicate-current, or the matching reflex db commands, instead. (#7742)

Features

  • Event handlers are awaitable: await State.handler(args) inside another event handler runs it right away on the same locked state and returns its result, so a handler may return a value to the backend code awaiting it (returned events still chain, a returned coroutine still raises, and return values are not sent to the frontend yet). An awaited handler passes through app middleware like a queued event; if a middleware blocks it, the await returns None. Awaiting a handler outside a client's event, such as in an API route outside app.modify_state, raises EventHandlerTypeError. A non-event value returned by a handler that an event trigger such as on_click ran is dropped, and in dev mode a warning names the handler once; returning an uncalled handler or event creator, such as rx.redirect, still raises TypeError. self.handler() keeps calling the plain method as before.

    @rx.event
    def add(self, amount: int) -> int:
        self.total += amount
        return self.total
    
    
    @rx.event
    async def add_twice(self, amount: int):
        await type(self).add(amount)
        total = await type(self).add(amount)
        yield rx.toast(f"total is now {total}")
    ``` ([#7673](https://github.com/reflex-dev/reflex/issues/7673), [#7782](https://github.com/reflex-dev/reflex/issues/7782), [#7821](https://github.com/reflex-dev/reflex/issues/7821))
  • Add rx.client_state for client-only state. A named var (rx.client_state("", name="query")) is global: any component can read and write it, and the backend can push and retrieve it. An unnamed var is owned by the outermost page or @rx.memo that uses it, so each @rx.memo instance gets its own value and a page's values reset when it unmounts. Setting a var re-renders only the components that read it. .set takes a value, a FunctionVar, or a lambda (count.set(lambda v: v + 1)) and replaces .set_value, which is deprecated and will be removed in 1.0. A name must be an ASCII identifier without $, and declaring one name with two different defaults fails the compile, naming both declarations. rx._x.client_state remains available with a deprecation warning. (#6936, #7804)

  • Add rx.vars.SetVar for set[T] and frozenset[T] state vars, computed vars and literals, with contains, length, union, intersection, difference, symmetric_difference, issubset, issuperset, isdisjoint and to_array operations. Elements compare by value, so sets of tuples work. rx.foreach accepts a set var directly. frozenset is now a serializable state var type, and an optional set var (set[T] | None) holding None acts as an empty set in every operation. (#7642)

  • reflex db init now runs alembic init and installs an alembic/env.py that loads the app and reads db_url from rxconfig.py, and reflex db migrate, makemigrations and status are thin wrappers over alembic upgrade head, alembic revision --autogenerate and alembic history --indicate-current. The alembic command line works on the same environment, so alembic downgrade -1 needs no extra setup, and alembic revision --autogenerate and alembic check evaluate the pages as reflex db makemigrations does, so a model that only a page imports is compared too. In apps initialized by an earlier release, the next reflex db command or migrate() call replaces the stock env.py with the current template, keeping the previous file as env.old and the existing revisions; migrate() logs a warning when it does so. An env.py edited by hand is kept, with a warning that it is not the Reflex template; if it fails, reflex run logs the error and the reflex db commands exit with it. To regenerate it, move it aside and run reflex db init. (#7742, #7809)

  • In development, Reflex warns when an event handler or other task blocks the asyncio event loop for longer than event_loop_blocking_threshold seconds (default 0.2, REFLEX_EVENT_LOOP_BLOCKING_THRESHOLD), naming the handler and the blocking line of your code. Set it to 0 to turn detection off. (#7672)

  • React Compiler (the experimental react_compiler option) now also optimizes generated components that use id refs, generated UUIDs and memoized event handlers such as upload callbacks, installs the experimental babel-plugin-react-compiler release, and logs a warning that the option is experimental. Add the experimental auto_memoize option (REFLEX_AUTO_MEMOIZE): set auto_memoize=False together with ...

Read more

reflex-release@0.2.2

Choose a tag to compare

@github-actions github-actions released this 12 Nov 00:58
527273b

Miscellaneous

  • Generated release workflows now default to uv 0.13.6 and Python 3.14.10, which reject the compromised eMudhra intermediate CA certificates. (#7661)