Metadata-Version: 2.4
Name: refast
Version: 0.0.5
Summary: Python + React UI framework for building reactive web applications
Author-email: Najeem Muhammed <najeem@gmail.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.104.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: uvicorn>=0.24.0
Requires-Dist: websockets>=12.0
Description-Content-Type: text/markdown

# 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

```bash
pip install refast
```

## Quick Start

```python
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

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

# Run tests
pytest tests/

# Run linting
ruff check src/
```

## License

MIT
