Registry / web-framework / frontend

frontend

JSON →
library0.0.3pypypiunverified

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.

pip install frontend
INSTALL
IMPORT
SIG · FRONTEND
F
frontend
web-frameworkpythonv0.0.3
Install
2.4s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 24MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Frontend
import frontend
from frontend import Frontend

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()
Debug
Known issues
gotchaThe `frontend` library is in a very early development stage (version 0.0.x). The API surface and core components are subject to rapid and potentially breaking changes between minor versions (e.g., 0.0.3 to 0.0.4).
fix
Pin exact versions of `frontend` in your `requirements.txt` (e.g., `frontend==0.0.3`) and review the GitHub repository's release notes or commit history carefully when upgrading.
affects: All 0.0.x versions
gotchaTo trigger UI re-renders after state changes in a `View`, you must explicitly call `self.update()` within your event handlers or state-modifying methods. Without this call, changes to instance attributes will not reflect in the browser.
fix
After modifying any state that should cause a UI update, ensure `self.update()` is called, typically at the end of the method (e.g., `def increment(self): self.count += 1; self.update()`).
affects: All 0.0.x versions
gotchaThe `app.run()` method provided in quickstarts is suitable for basic local development and testing. For production deployments or more robust development setups, it's recommended to use a standard ASGI server like `uvicorn`.
fix
Instead of `app.run()`, install `uvicorn` (`pip install uvicorn`) and run your application using `uvicorn your_module_name:app --reload` (replace `your_module_name` with the actual Python file name).
affects: All 0.0.x versions
Upgrade
Version history
0.0.3latest on PyPI · released Apr 15, 2020
Audit
Dependencies
pydanticrequiredUsed for data validation and modeling within the framework's core.
Agent activity
4 hits · last 30 days
node
4
Resources
frontend — pip install frontend · libregistry