Skip to main content

Python + React UI framework for building reactive web applications

Project description

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

Project details


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.0.1.tar.gz (540.6 kB view details)

Uploaded Source

Built Distribution

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

refast-0.0.1-py3-none-any.whl (160.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: refast-0.0.1.tar.gz
  • Upload date:
  • Size: 540.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0.1.tar.gz
Algorithm Hash digest
SHA256 04459e498a09670abb3053dc1ecd19bb9c621ec11df3a8d2de2235778c8e33d8
MD5 9d017360bcf641178f9993a4105ea45b
BLAKE2b-256 64948a8a90103596c390f1c09beee8f6550b229f6ff0d1955821406025912286

See more details on using hashes here.

File details

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

File metadata

  • Download URL: refast-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 160.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b90bccde7faf2c1f61e78a74592fde2e99ce620f512c6d622222580e5ae20f65
MD5 c976002ab0a989b36446b64911d2f0d7
BLAKE2b-256 c46d3d78612d8da24e1496214c05ce9b314b9bc0a30aaf27e322965d91c7c54a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page