Skip to content

The core functionality for ToscaWidgets2, a web widget toolkit for Python to aid in the creation, packaging and distribution of common view elements normally used in the web.

License

Notifications You must be signed in to change notification settings

toscawidgets/tw2.core

Repository files navigation

ToscaWidgets

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.

About

The core functionality for ToscaWidgets2, a web widget toolkit for Python to aid in the creation, packaging and distribution of common view elements normally used in the web.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages