Skip to main content

No project description provided

Project description

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

import starfyre

from .component import Component


def main():
    component = Component()
    starfyre.render(component, starfyre.js.document.getElementById("root"))

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>""",
        {"updateCount": updateCounter},
        state={"get_component_state": get_component_state},
    )

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.2.0.tar.gz (4.2 MB view details)

Uploaded Source

Built Distributions

starfyre-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (170.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

starfyre-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (170.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: starfyre-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.11

File hashes

Hashes for starfyre-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bbb72617603ce4b109bf6528ceb70d9a2b7cc5d50ec2734d1780fbbf868f2cd6
MD5 605d2f81fd1b7e02307478795acc10b5
BLAKE2b-256 db97f5b165aeb44fa15115f2337458c12b2499d05f0bd59e24313fba5b0c5f20

See more details on using hashes here.

File details

Details for the file starfyre-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for starfyre-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5e777a801b96448ad7c8e43fbefe5cb94494daab0f6987346304745d7bb77e7
MD5 e0c463749457c69dbce71620b5789c36
BLAKE2b-256 7b5ffc63535edb9e557c22cfe717dff59608cac9f22b005f06f34bdf41e2d5a3

See more details on using hashes here.

File details

Details for the file starfyre-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for starfyre-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2b84abdc457085ad63255a17fece0324ed11e51afc057eb6861b9802d2e24185
MD5 0915f7c25730e1d047ac2f28d9bca8d8
BLAKE2b-256 1da2876c49afb442b86dd8b40e1a33d2bf23ee71f27e114060ac23ed73ffb720

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