A fast, declarative, and incrementally adoptable Python web frontend framework for building reactive web user interfaces.
Project description
PyFyre - The Python Web Frontend Framework
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.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfyre-0.6.9.tar.gz.
File metadata
- Download URL: pyfyre-0.6.9.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a35a99cb7db92a86a095fe42c254c09b4ea9011033b76e570c7ed454e821e7d2
|
|
| MD5 |
68c39ddc87d3c054a81461b1fc4e9b73
|
|
| BLAKE2b-256 |
20de400926b2216921a17df732e2f695a655c3aefb6b2f6ecb99937c069a63df
|
File details
Details for the file pyfyre-0.6.9-py3-none-any.whl.
File metadata
- Download URL: pyfyre-0.6.9-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f129f0e0161a83c3890bed769cd5aa8ec000a926bacd421deb1eae3b6b3821fa
|
|
| MD5 |
3a71fd84022ed2bf4cecb05bb5e7ad73
|
|
| BLAKE2b-256 |
dce0b33448269decf5ad1401d703de9a0ed6ce89f7a57d155997e0da8c5b4622
|