Skip to main content

A Python package for designing web UIs.

Project description

WebWidgets

CI Status

A Python package for creating web UIs

Installation

You can install WebWidgets with pip. To install the latest stable version, run:

pip install webwidgets

Usage

WebWidgets allows you to create custom widgets and build websites with them. For example:

import webwidgets as ww
from webwidgets.compilation.html import HTMLNode, RawText

# A <div> element
class Div(HTMLNode):
    pass

# A simple text widget
class Text(ww.Widget):
    def build(self):
        return Div([RawText("Hello, World!")])

# A website with one page containing a Text widget
page = ww.Page([Text()])
website = ww.Website([page])

# Compile the website into HTML code
compiled = website.compile()
print(compiled.html_content[0])

Prints the following result:

<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <div>
            Hello, World!
        </div>
    </body>
</html>

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

webwidgets-1.1.1.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

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

webwidgets-1.1.1-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file webwidgets-1.1.1.tar.gz.

File metadata

  • Download URL: webwidgets-1.1.1.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for webwidgets-1.1.1.tar.gz
Algorithm Hash digest
SHA256 aa0ba3f9ae243fdd264a4092e58932229fe62e62f6444d58ba392283e0bda685
MD5 a32cadb106c3095bab83ebf1d5e5d20f
BLAKE2b-256 bca1d3f40f03aab44a85bf544e46a10d7edcee7316feb87004e4d1769918db51

See more details on using hashes here.

Provenance

The following attestation bundles were made for webwidgets-1.1.1.tar.gz:

Publisher: cd.yml on mlaasri/WebWidgets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webwidgets-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: webwidgets-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for webwidgets-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f71e4372e81065c43a768e39cece78f02dd1ec1ce700c4ae9fea7ed685fe8dd3
MD5 c732ac71a2edd5f635dbbeece43d2aee
BLAKE2b-256 58049293b0650fce0cf6ee2e178580913cf4c01f8447cbc690e0d3ce663b2475

See more details on using hashes here.

Provenance

The following attestation bundles were made for webwidgets-1.1.1-py3-none-any.whl:

Publisher: cd.yml on mlaasri/WebWidgets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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