Skip to main content

A Python Framework for writing Reactive web Front-Ends

Project description

Starfyre Logo

Starfyre ⭐🔥

Introduction:

Starfyre is a library that allows you to build reactive frontends using only Python. It is built using pyodide and wasm, which enables it to run natively in the browser. With Starfyre, you can create interactive, real-time applications with minimal effort. Simply define your frontend as a collection of observables and reactive functions, and let Starfyre handle the rest.

Please note that Starfyre is still very naive and may be buggy, as it was developed in just five days. However, it is under active development and we welcome contributions to improve it. Whether you are a seasoned web developer or new to frontend development, we hope that you will find Starfyre to be a useful tool. Its intuitive API and simple, declarative style make it easy to get started, and its powerful features allow you to build sophisticated applications.

Installation:

The easiest way to get started is to clone create-starfyre-app repo. Hosted at create-starfyre-app

Sample Usage

src/init.py

from starfyre import create_component, render

from .component import Component


def main():
    component = Component()
    render(create_component(<component></component>))

src/component.py

from starfyre import create_component, create_signal

[get_component_state, set_state] = create_signal(0)


def updateCounter(component, *args):
    set_state(get_component_state(component) + 1)


def Component():
    return create_component("""<div onClick={updateCounter}>
        This is the component state
        <button>Click Here to increment</button> {get_component_state}
        </div>""",
    )

Developing Locally

  1. make in-dev

For more flexibility, see make help

Feedback

Feel free to open an issue and let me know what you think of it.

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

starfyre-0.6.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

starfyre-0.6.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file starfyre-0.6.0.tar.gz.

File metadata

  • Download URL: starfyre-0.6.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.7 Darwin/21.6.0

File hashes

Hashes for starfyre-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e379d261d1af1af98deddabbbd8ea69238757a0ccd99385feda3cb7fcd974a0c
MD5 c1d8a0082a262fac85a95e83027591fa
BLAKE2b-256 d74a44e2a522e8c50cd11b51162d725b0cd5f2f047566cad02772a5a37ecb3d9

See more details on using hashes here.

File details

Details for the file starfyre-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: starfyre-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.7 Darwin/21.6.0

File hashes

Hashes for starfyre-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b960802ef3a6e4c63d306324edd02a5d0dfa1909c3be75ac4085d191836d4af
MD5 d046e1346d37a48000c6ef0602e8954a
BLAKE2b-256 909fbd691a8b942932fd768cae0d104fc1abf26d521cfdf4750835278b75bf60

See more details on using hashes here.

Supported by

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