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.2.9.tar.gz (902.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for tw2.core-2.2.9.tar.gz
Algorithm Hash digest
SHA256 ded6c29c99d0f6f5b945088e660ae4671b50f9e28eec5f50bcc9282ac0faea4e
MD5 1d14919744ebe987e2480b5f0a4237c8
BLAKE2b-256 ae39315a0281417e34c40bbcd1263dd2bee7278207543082b0374e46b4cf0c5d

See more details on using hashes here.

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