Domonic

Latest version: v0.9.12

Safety actively analyzes 613568 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 17

0.9.12

Haven't touched this for over a year due to being busy. But figured I'd give it a polish and see if I remembered how to code. I deleted the discord for this repo so just comment on discussions tab if you want.

- Update the referenced libraries
- Update the Event class to include an async event
- Port the demos to use fast api instead of sanic

0.9.11

Quotes around attribute values
--------------------------------

The quotes around attributes can be finely controlled using the DOMConfig.ATTRIBUTE_QUOTES flag

By default everything is double quoted on render.

However a flag can be set to None which will not render quotes if the passed value is not a string.

Alternatively it can be set to use a single quotation mark or even False to use None at all and control it yourself.

Examples provided below:


>>> from domonic.html import *
>>> from domonic.dom import DOMConfig
>>> print(body(test="123"))
<body test="123"></body>
>>> print(body(test=123))
<body test="123"></body>
>>> DOMConfig.ATTRIBUTE_QUOTES = None
>>> print(body(test=123))
<body test=123></body>
>>> print(body(test="123"))
<body test="123"></body>
>>> DOMConfig.ATTRIBUTE_QUOTES = "'"
>>> print(body(test="123"))
<body test='123'></body>
>>> DOMConfig.ATTRIBUTE_QUOTES = True
>>> print(body(test="123"))
<body test="123"></body>
>>> print(body(test=123))
<body test="123"></body>
>>> DOMConfig.ATTRIBUTE_QUOTES = False
>>> print(body(test="123"))
<body test=123></body>
>>> print(body(test="TEXT"))
<body test=TEXT></body>

0.9.10

Fixes parser errors where html nodes was being nested.
Adds a DOMConfig to set some rendering options
Adds default params some Elements for hinting while using
Fixes call to pyml which wasn't putting text nodes in strings.
Updates docs to mention the DOMConfig

0.9.9

Adds a global Autoescape for testing.
It's on Node. something like Node.GLOBAL_AUTOESCAPE = True should set it.

Namespaces are one honking great idea — let's do more of those! via [piotrm0](https://github.com/piotrm0)
Adds a tags modules as a namespace package. (It's either that or lose the 'html' element from being included in root.)

0.9.8

Started some unit tests for Javascript Date and began to fix up bugs.
Still a way to go on that but much improved.

0.9.7

sseclient was stopping install on 3.10. so don't use 0.9.6, sorry. not sure why this wasn't picked up in git workflow tests.

Page 1 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.