Skip to main content

refast_grid

Spreadsheet component for refast

A Refast extension that provides the RefastGrid component.

Installation

pip install refast_grid

Usage

Option 1: Auto-Discovery (Recommended)

When you install the package, Refast will automatically discover and load the extension:

from fastapi import FastAPI
from refast import RefastApp, Context
from refast.components import Container, Button, Row
from refast_grid import RefastGrid

# Extension is auto-discovered, no need to manually register
ui = RefastApp(title="RefastGrid Demo")


@ui.page("/")
def home(ctx: Context):
    return Container(
        children=[
            RefastGrid(
                id="my-component",
                value="Hello, World!",
            ),
        ]
    )


app = FastAPI()
app.include_router(ui.router)

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

Option 2: Manual Registration

If you want to disable auto-discovery and register extensions manually:

from refast import RefastApp
from refast_grid import RefastGrid, RefastGridExtension

ui = RefastApp(
    title="RefastGrid Demo",
    auto_discover_extensions=False,
    extensions=[RefastGridExtension()],
)

Component Props

Prop Type Default Description
value str "" The value to display
on_change Callback None Called when the value changes
id str None Component ID
class_name str "" CSS classes to apply

Development

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • npm

Building the Frontend

cd frontend
npm install
npm run build

This builds the UMD bundle to src/refast_grid/static/.

Installing Locally

# Install with automatic frontend build (via hatch hook)
pip install -e .

# Or build frontend first, then install
cd frontend && npm install && npm run build && cd ..
pip install -e .

Running the Example

python usage.py

Then open http://localhost:8000 in your browser.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for refast_grid 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refast_grid 0.3.0
File Size Uploaded Provenance
refast_grid-0.3.0.tar.gz 35.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for refast_grid 0.3.0
File Interpreter ABI Platform
refast_grid-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 129.2 kB

Release files / refast_grid-0.3.0.tar.gz

Download URL refast_grid-0.3.0.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
16e16a04cc0c8f77c9972684ddc10911bc10446993b903f7c22f1d9595a055a0
BLAKE2b-256 checksum
How to use checksums
c3ba2ed5dd8caac9bad85c6a53c0c4b145d86e50cfbc1a15e1fa7b150820f8f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}

Release files / refast_grid-0.3.0-py3-none-any.whl

Download URL refast_grid-0.3.0-py3-none-any.whl
Size 93.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0b99a2e7c3fb4a7c29c7e1ac44f3f68996452f1c5506805ba59f4adf76b03bf
BLAKE2b-256 checksum
How to use checksums
5ad33dca66cfce65c727b3344a2d7797394570e688b24a9702bf6adbdf5cfeb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}

Security for refast_grid 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

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