Skip to main content

The runtime components for ToscaWidgets 2, a web widget toolkit.

Project description

ToscaWidgets is a web widget toolkit for Python to aid in the creation, packaging and distribution of common view elements normally used in the web:

import tw2.core as twc

class HelloWidget(twc.Widget):
    inline_engine_name = "kajiki"
    template = """
        <i>Hello ${w.name}</i>
    """

    name = twc.Param(description="Name of the greeted entity")

>>> HelloWidget(name="World").display()
<i>Hello World</i>

The tw2.core package is lightweight and provides the runtime of ToscaWidgets, all machinery related to forms is provided by tw2.forms:

import tw2.core as twc
import tw2.forms as twf

class MovieForm(twf.Form):
    class child(twf.TableLayout):
        title = twf.TextField()
        director = twf.TextField(value='Default Director')
        genres = twf.SingleSelectField(options=['Action', 'Comedy', 'Romance', 'Sci-fi'])

    action = '/save_movie'

Build Status

Branch

Build Status

Test Coverage

master

Build Status - master branch

Test Coverage - master branch

develop

Build Status - develop branch

Test Coverage - develop branch

Documentation

Documentation is hosted at ReadTheDocs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tw2.core-2.3.0.tar.gz (235.9 kB view details)

Uploaded Source

File details

Details for the file tw2.core-2.3.0.tar.gz.

File metadata

  • Download URL: tw2.core-2.3.0.tar.gz
  • Upload date:
  • Size: 235.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for tw2.core-2.3.0.tar.gz
Algorithm Hash digest
SHA256 c321f410354005e33d11c3982ac532f763761d6a476386ec02cbdccd955e7e6c
MD5 74bdf7a7d41866277271e7ddab3e6cb4
BLAKE2b-256 84d60a4754daf32a1409aa9dd785a88c36c3f3d80a5c72a602ed4262ab179a7f

See more details on using hashes here.

Supported by

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