Skip to main content

Brython-components is an easy implementation of brython's webcomonent

Project description

Brython-components

Brython-components is an easy implementation of brython's webcomonent.

Installation

Use the package manager pip to install.

pip install brip
brip install brython-components

Usage

'''python from brython_components impoprt defineElement, customElement

@defineElement("bold-italic") class BoldItalic(customElement): def connectedCallback(self): super().connectedCallback() print("connected callback", self)

def render(self):
    return f"<b><i>{self.attrs['data-val']}</i></b>"

'''

License

MIT

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

brython-components-0.1.2.tar.gz (2.7 kB view hashes)

Uploaded source

Built Distribution

brython_components-0.1.2-py3-none-any.whl (2.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page