frontend

0.0.3 · active · verified Fri Apr 17

The `frontend` library (version 0.0.3) allows developers to build complex and beautiful user interfaces using Python. It abstracts away traditional web technologies, enabling Python developers to create interactive frontends with a Pythonic syntax. As an early-stage project, it is actively developing its core features and API, with a relatively low release cadence reflecting its current development phase.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize a `Frontend` application, define a basic `View` using a decorator for routing, and render simple HTML elements like `H1` within a `Div`. Running the script will start a local development server, typically accessible at `http://127.0.0.1:8000`.

from frontend.main import Frontend
from frontend.views import View

app = Frontend()

@app.route("/")
class MyView(View):
    def render(self):
        return self.Div(self.H1("Hello, Frontend!"))

if __name__ == "__main__":
    # In a real application, you might run this with uvicorn directly:
    # uvicorn your_module:app --reload
    # For this quickstart, app.run() provides a basic server.
    app.run()

view raw JSON →