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.0.0.tar.gz (26.3 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.0.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for webwidgets-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f3d2b53ace78cae7157425d2525a7a32236cb692d1980e443c81f5526ccaa73a
MD5 03e48829320673eb8e496d22989af4bc
BLAKE2b-256 671b25008111de68ee4aac4e480556f8ea3858592de82b444df3a0e84d96d4bf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: webwidgets-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b274b145a25534687eefac13897f0494d397beccbf79267ce1bd3bf3e29cb65
MD5 bab108e3b1c8ed4aef6883214d4650cb
BLAKE2b-256 93507a5173538ea1794013c87dff7d9360417b705794c9fb780205d46dcd0ecd

See more details on using hashes here.

Provenance

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