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 |
||
develop |
Documentation
Documentation is hosted at ReadTheDocs.
Project details
Release history Release notifications | RSS feed
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.8.tar.gz
(902.1 kB
view details)
File details
Details for the file tw2.core-2.2.8.tar.gz.
File metadata
- Download URL: tw2.core-2.2.8.tar.gz
- Upload date:
- Size: 902.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
292adae9f3520c0e050799109ea062a4ae3684c110fe9d7856a9815b91f0916a
|
|
| MD5 |
01e0cf39ecd8122fe8cd112487076bb0
|
|
| BLAKE2b-256 |
c2e2a753fe0c7667e2dbc48447cd049941ed7486b1700e1f01d31d55bae1427b
|