Skip to main content

Refast

Python + React UI Framework for Building Reactive Web Applications

Refast is a framework that enables building reactive web applications with Python-first development. It uses FastAPI for the backend and React with shadcn/ui for the frontend.

Features

  • Python-First Development: Build your UI logic entirely in Python
  • Reactive Components: Real-time updates via WebSocket
  • shadcn/ui Integration: Beautiful, accessible components out of the box
  • FastAPI Integration: Plug into any existing FastAPI application
  • Type Safety: Full type hints and Pydantic validation throughout

Installation

pip install refast

Quick Start

from refast import RefastApp, Context

ui = RefastApp(title="My App")

@ui.page("/")
def home(ctx: Context):
    return Container(
        Text("Hello, World!"),
        Button("Click me", on_click=ctx.callback(handle_click))
    )

async def handle_click(ctx: Context):
    await ctx.show_toast("Button clicked!")

# Mount to FastAPI
from fastapi import FastAPI
app = FastAPI()
app.include_router(ui.router, prefix="/ui")

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run linting
ruff check src/

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

refast-0.11.1.tar.gz (7.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refast-0.11.1-py3-none-any.whl (7.5 MB view details)

Uploaded Python 3

File details

Details for the file refast-0.11.1.tar.gz.

File metadata

  • Download URL: refast-0.11.1.tar.gz
  • Upload date:
  • Size: 7.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for refast-0.11.1.tar.gz
Algorithm Hash digest
SHA256 ccf4a3431651a049e90ab5f8ec97d959e8c97e0a2a861ee542a0e119ac0da3f2
MD5 b675e3af5d55b7a50626351ff62f6649
BLAKE2b-256 7aff875ca72e3401a9f6ffe9be980fe8c7d3a2d69ad8eb2343ee8f732d37da91

See more details on using hashes here.

File details

Details for the file refast-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: refast-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for refast-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21e03f827036520d9162981c618deaf20eb9efc7fbf53563a1b95e8b39f06cd4
MD5 48527c2da044a69a421a7876bd4fb4d3
BLAKE2b-256 b374d9aac34579c7091da674dbe8ce99640bb3904204141c502327ed0d87fd90

See more details on using hashes here.

Release history Release notifications | RSS feed

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

This release

0.11.1 This release

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page