Skip to main content

A Python-first frontend UI framework

Project description

PyUI Framework — Python Frontend Framework (No HTML, No CSS, No JavaScript)

PyUI is a Python-first frontend framework that allows developers to build modern, responsive web user interfaces using only Python.

With PyUI, you can design complete web frontends without writing HTML, CSS, or JavaScript. All UI logic, layout, styling, and interactions are defined in Python.

Keywords (for PyPI SEO)

Python frontend framework, Python UI framework, Python web UI, frontend without JavaScript, frontend using Python, Python web components, Python alternative to React, Python UI library

Why PyUI?

Frontend development usually requires:

  • HTML for structure
  • CSS for styling
  • JavaScript for logic

PyUI removes this complexity.

✔ Single-language development (Python only) ✔ Built-in styling and layout system ✔ Component-based architecture ✔ CLI-powered build & serve workflow ✔ Generates standard static web files

If you know Python, you can build frontend UI immediately.

Installation

pip install pyui-framework

Requires Python 3.9+

Quick Start Example

Create a file app.py:

from pyui.core.page import Page
from pyui.core.layout import Column
from pyui.core.text import Text
from pyui.core.component import Button

page = Page(
    Column(
        Text("Hello PyUI"),
        Button("Click Me")
    ),
    title="My PyUI App"
)

page.build()

Build and serve:

pyui build
pyui serve

Open in browser:

👉 http://localhost:8000

Core Features

🧩 Component-Based UI

  • Declarative Python components
  • Clean and readable UI definitions
  • Easy to extend and customize

📐 Layout System

  • Column & Row layouts
  • Responsive 12-column Grid
  • Cards with elevation levels
  • Navbar and containers

🎨 Built-in Styling

  • Predefined CSS system
  • Button variants (primary, secondary, danger)
  • Text sizes (sm, md, lg)
  • Light & Dark theme support
  • No manual CSS required

⚡ Event Handling

  • Python-based event callbacks
  • Button click handlers
  • Form interactions

🔁 State Management

Reactive state using Python:

from pyui.core.state import State

count = State(0)

State updates automatically reflect in the UI.

CLI Commands

PyUI includes a built-in command line interface:

pyui build   # Build UI into dist/
pyui serve   # Serve UI locally

This makes PyUI suitable for:

  • Rapid prototyping
  • Internal tools
  • Demos & hackathons
  • Learning frontend concepts using Python

Output

PyUI generates standard static web assets:

dist/
├── index.html
├── style.css
└── script.js

These files can be:

  • Hosted anywhere
  • Deployed on static servers
  • Shared easily

Who Should Use PyUI?

  • Python developers
  • Backend engineers
  • Students & beginners
  • Data science engineers
  • Hackathon participants
  • Anyone who wants frontend without JavaScript

Design Philosophy

  • Python is the UI language
  • Minimal API surface
  • Predictable behavior
  • No hidden magic
  • Framework-managed CSS & JS

PyUI focuses on clarity, simplicity, and developer productivity.

Project Status

  • Stable core
  • Actively developed
  • API may evolve
  • Open to contributions

Roadmap

  • Advanced state reactivity
  • Client-side routing (SPA-style)
  • Hot reload for development
  • Component documentation site
  • Theme & component marketplace

License

MIT License Free to use, modify, and distribute.

Author

Developed by Jyotika Jayani

Final Note

PyUI is not a replacement for React or Flutter. It is a Python-native approach to frontend development.

If you can write Python, you can build real web interfaces.

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

pyui_framework-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyui_framework-0.1.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file pyui_framework-0.1.0.tar.gz.

File metadata

  • Download URL: pyui_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for pyui_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c0711bdb17d32b0a1a3b2ad4beea6999fe25587e7549c1067d80c509fc7ee48e
MD5 6bd2c2364d1aa764a32d352375a2ef31
BLAKE2b-256 78069bf8fedd1018179ad47ee641207a8fab1171a8edcc52418cc491a3992fd6

See more details on using hashes here.

File details

Details for the file pyui_framework-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyui_framework-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for pyui_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6552a9b177b9b0794f22679f3a3217b7eadc996126b784d1e4739ee7cf742fd2
MD5 73c2c4bc00b5695d6a24dabae4e2906f
BLAKE2b-256 7792590a0dc0bcb2795ab97b39c1a391ec4d6c2384b3e0a5e55414c3eea21fd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page