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.0.tar.gz (34.4 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.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webwidgets-1.1.0.tar.gz
  • Upload date:
  • Size: 34.4 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.0.tar.gz
Algorithm Hash digest
SHA256 c9b3a60a1354b0c14597a5c1041922409f017d544648874ef8ba3cdd9265afe0
MD5 5905458b86ead5cf46b3971dc7c02b05
BLAKE2b-256 5140128cd638759a6300145e220d490ad8439306ce92ebdd63383cc35069430b

See more details on using hashes here.

Provenance

The following attestation bundles were made for webwidgets-1.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: webwidgets-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 add22709fc353e9b09fc3004db78bc0ede4a3b0aba4c447f3c0e9102228dcc04
MD5 a0909bb778e7a99d0ab81b06412eb350
BLAKE2b-256 a3fc616074a6f9abbf8ef9687cd44207d7c28ae0178dd271eb5ed400297a9816

See more details on using hashes here.

Provenance

The following attestation bundles were made for webwidgets-1.1.0-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