Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timothycrosley/thedom
A python framework to generate html and JavaScript from reusable and combine-able widgets.
https://github.com/timothycrosley/thedom
Last synced: 14 days ago
JSON representation
A python framework to generate html and JavaScript from reusable and combine-able widgets.
- Host: GitHub
- URL: https://github.com/timothycrosley/thedom
- Owner: timothycrosley
- License: gpl-2.0
- Created: 2012-08-11T14:34:16.000Z (over 12 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-26T20:15:08.000Z (about 2 years ago)
- Last Synced: 2025-01-18T11:08:59.443Z (21 days ago)
- Language: Python
- Size: 7.89 MB
- Stars: 23
- Watchers: 7
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-python-html - timothycrosley/thedom - able widgets. (Libraries / General HTML Generation)
- awesome-python-html - timothycrosley/thedom - able widgets. (Libraries / General HTML Generation)
README
![thedom](https://raw.github.com/timothycrosley/thedom/develop/logo.png)
=====[![PyPI version](https://badge.fury.io/py/thedom.png)](http://badge.fury.io/py/thedom)
[![PyPi downloads](https://pypip.in/d/thedom/badge.png)](https://crate.io/packages/thedom/)
[![Build Status](https://travis-ci.org/timothycrosley/thedom.png?branch=master)](https://travis-ci.org/timothycrosley/thedom)
[![License](https://pypip.in/license/thedom/badge.png)](https://pypi.python.org/pypi/thedom/)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/timothycrosley/thedom/trend.png)](https://bitdeli.com/free "Bitdeli Badge")thedom is a collection of python objects that enable developers to generate and interact with web apps server side.
It encourages object oriented website development, and code reuse by seperating each DOM element into its own object,
and then allowing inheritance and child elements to come together to form new elements not defined in the standard DOM.write this:
from thedom import layout, document, buttons
page = document.Document()
layout = page.addChildElement(layout.Center()).addChildElement(layout.Horizontal())
layout += buttons.Button(text="Use thedom.", **{'class':'MainAction'})
layout += buttons.Button(text="Enjoy writing less code.", **{'class':'DeleteAction'})
layout += buttons.Button(text="100% Python.")print page.toHTML(formatted=True)
get this:
Installing thedom
===================Installing thedom is as simple as:
pip install thedom
or if you prefer
easy_install thedom
--------------------------------------------
Thanks and I hope you find thedom useful!
~Timothy Crosley