Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

thedom

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thedom

thedom is a collection of python objects that enable you to represent and interact with the DOM server side before generating HTML, CSS, and JavaScript for the client.

  • 0.0.1
  • PyPI
  • Socket score

Maintainers
1

|thedom|

|PyPI version| |PyPi downloads| |Build Status| |License| |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:

::

<!DOCTYPE html>
<html>
    <head>
    <title>
    </title>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    </meta>
    </head>
    <body>
        <div class="WCenter">
            <div class="WOuter">
                <div class="WInner">
                    <div class="WClear">
                        <input class="WBlock WLeft MainAction" type="button" value="Use thedom." />
                        <input class="WBlock WLeft DeleteAction" type="button" value="Enjoy writing less code." />
                        <input class="WBlock WLeft" type="button" value="100% Python." />
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>

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

.. |thedom| image:: https://raw.github.com/timothycrosley/thedom/develop/logo.png .. |PyPI version| image:: https://badge.fury.io/py/thedom.png :target: http://badge.fury.io/py/thedom .. |PyPi downloads| image:: https://pypip.in/d/thedom/badge.png :target: https://crate.io/packages/thedom/ .. |Build Status| image:: https://travis-ci.org/timothycrosley/thedom.png?branch=master :target: https://travis-ci.org/timothycrosley/thedom .. |License| image:: https://pypip.in/license/thedom/badge.png :target: https://pypi.python.org/pypi/thedom/ .. |Bitdeli Badge| image:: https://d2weczhvl823v0.cloudfront.net/timothycrosley/thedom/trend.png :target: https://bitdeli.com/free

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc