Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pyfyre

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyfyre

A fast, declarative, and incrementally adoptable Python web frontend framework for building reactive web user interfaces.

  • 0.6.9
  • Source
  • PyPI
  • Socket score

Maintainers
2

image

PyFyre - The Python Web Frontend Framework

forthebadge

GitHub Version Github Star License

A fast, declarative, and incrementally adoptable Python web frontend framework for building reactive web user interfaces.

Features

  • Component-based framework. Developers who have experience in using other frontend frameworks should feel quite at home when using PyFyre.
  • Truly reactive. PyFyre's virtual DOM allows for simple and efficient state management.
  • Quick navigation. Navigation between pages is quick with PyFyre's single-page application design.
  • Pythonic code with static typing. Developing with PyFyre is much easier with its type hinting and Pythonic style of coding.
  • Asynchronous programming. Run non-blocking functions out of the box.
  • CPython interoperability. Developers can limitedly use CPython packages on the client-side web.
  • JavaScript interoperability. Allowing developers to leverage NPM packages and integrate with existing JavaScript applications.
  • Pure Python. Build web apps without ever touching other languages like HTML and JavaScript.
  • And more!

Example

See the examples directory for more. If you want to quickly test how PyFyre feels or looks like, try our playground! But here is a super simple example. See how easy it is to create a simple Counter app with PyFyre:

from browser import DOMEvent
from pyfyre import render, State
from pyfyre.nodes import Node, Widget, Text, Button


class App(Widget):
    def __init__(self) -> None:
        self.count = State[int](0)
        super().__init__()

    def build(self) -> list[Node]:
        def increment(event: DOMEvent) -> None:
            self.count.set_value(self.count.value + 1)

        def decrement(event: DOMEvent) -> None:
            self.count.set_value(self.count.value - 1)

        return [
            Button(onclick=decrement, children=lambda: [Text("-")]),
            Text(self.count),
            Button(onclick=increment, children=lambda: [Text("+")]),
        ]


render({"/": lambda: App()})

Documentation

Learn PyFyre by reading the documentation. It is also advisable to learn Brython alongside PyFyre as it is built on top of Brython.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc