πŸ€– autodocsΒΆ

domonicΒΆ

A library for creating html

domonic.htmlΒΆ

Generate HTML using python.

exception domonic.html.TemplateError(error, message='TemplateError: ')[source]ΒΆ
class domonic.html.a(*args, **kwargs)ΒΆ
class domonic.html.abbr(*args, **kwargs)ΒΆ
class domonic.html.address(*args, **kwargs)ΒΆ
class domonic.html.applet(*args, **kwargs)ΒΆ
class domonic.html.area(*args, **kwargs)ΒΆ
class domonic.html.article(*args, **kwargs)ΒΆ
class domonic.html.aside(*args, **kwargs)ΒΆ
class domonic.html.audio(*args, autoplay: Optional[bool] = None, controls=None, loop=None, muted=None, preload=None, src=None, **kwargs)ΒΆ
class domonic.html.b(*args, **kwargs)ΒΆ
class domonic.html.base(*args, href=None, target=None, **kwargs)ΒΆ
class domonic.html.basefont(*args, **kwargs)ΒΆ
class domonic.html.bdi(*args, **kwargs)ΒΆ
class domonic.html.bdo(*args, **kwargs)ΒΆ
class domonic.html.blockquote(*args, **kwargs)ΒΆ
class domonic.html.body(*args, aLink=None, background=None, bgColor=None, link=None, onload=None, onunload=None, text=None, vLink=None, **kwargs)ΒΆ
class domonic.html.br(*args, **kwargs)ΒΆ
class domonic.html.button(*args, disabled: Optional[bool] = None, form=None, formaction: Optional[str] = None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, name=None, type=None, value=None, **kwargs)ΒΆ
class domonic.html.canvas(*args, width: Optional[int] = None, height: Optional[int] = None, **kwargs)ΒΆ
class domonic.html.caption(*args, **kwargs)ΒΆ
class domonic.html.center(*args, **kwargs)ΒΆ
class domonic.html.cite(*args, **kwargs)ΒΆ
class domonic.html.closed_tag(*args, **kwargs)[source]ΒΆ
class domonic.html.code(*args, **kwargs)ΒΆ
class domonic.html.col(*args, **kwargs)ΒΆ
class domonic.html.colgroup(*args, **kwargs)ΒΆ
class domonic.html.command(*args, **kwargs)ΒΆ
class domonic.html.comment(data)ΒΆ
domonic.html.create_element(name='custom_tag', *args, **kwargs)[source]ΒΆ

A method for creating custom tags

tag name needs to be set due to custom tags with hyphens can’t be classnames. i.e. hypenated tags <some-custom-tag></some-custom-tag>

class domonic.html.data(*args, **kwargs)ΒΆ
class domonic.html.datalist(*args, **kwargs)ΒΆ
class domonic.html.dd(*args, **kwargs)ΒΆ
class domonic.html.details(*args, **kwargs)ΒΆ
class domonic.html.dfn(*args, **kwargs)ΒΆ
class domonic.html.dialog(*args, open=None, **kwargs)ΒΆ
class domonic.html.div(*args, **kwargs)ΒΆ
class domonic.html.dl(*args, **kwargs)ΒΆ
class domonic.html.doctype(name: str = 'html', publicId: str = '', systemId: str = '')ΒΆ
class domonic.html.dt(*args, **kwargs)ΒΆ
class domonic.html.em(*args, **kwargs)ΒΆ
class domonic.html.embed(*args, **kwargs)ΒΆ
class domonic.html.fieldset(*args, **kwargs)ΒΆ
class domonic.html.figcaption(*args, **kwargs)ΒΆ
class domonic.html.figure(*args, **kwargs)ΒΆ
class domonic.html.font(*args, **kwargs)ΒΆ
class domonic.html.footer(*args, **kwargs)ΒΆ
class domonic.html.form(*args, **kwargs)[source]ΒΆ
class domonic.html.h1(*args, **kwargs)ΒΆ
class domonic.html.h2(*args, **kwargs)ΒΆ
class domonic.html.h3(*args, **kwargs)ΒΆ
class domonic.html.h4(*args, **kwargs)ΒΆ
class domonic.html.h5(*args, **kwargs)ΒΆ
class domonic.html.h6(*args, **kwargs)ΒΆ
class domonic.html.head(*args, **kwargs)ΒΆ
class domonic.html.header(*args, **kwargs)ΒΆ
class domonic.html.hgroup(*args, **kwargs)ΒΆ
class domonic.html.hr(*args, **kwargs)ΒΆ
class domonic.html.html(*args, **kwargs)ΒΆ
class domonic.html.i(*args, **kwargs)ΒΆ
class domonic.html.iframe(*args, **kwargs)ΒΆ
class domonic.html.img(*args, alt=None, src=None, crossorigin=None, height=None, ismap=None, longdesc=None, sizes=None, srcset=None, usemap=None, width=None, **kwargs)ΒΆ
class domonic.html.input(*args, accept=None, alt=None, autocomplete=None, autofocus=None, checked=None, dirname=None, disabled=None, form=None, formaction=None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, height=None, _list=None, _max=None, maxlength=None, _min=None, multiple=None, name=None, pattern=None, placeholder=None, readonly=None, required=None, size=None, src=None, step=None, type=None, value=None, width=None, **kwargs)ΒΆ
class domonic.html.ins(*args, **kwargs)ΒΆ
class domonic.html.isindex(*args, **kwargs)ΒΆ
class domonic.html.kbd(*args, **kwargs)ΒΆ
class domonic.html.keygen(*args, **kwargs)ΒΆ
class domonic.html.label(*args, **kwargs)ΒΆ
class domonic.html.legend(*args, **kwargs)ΒΆ
class domonic.html.li(*args, **kwargs)ΒΆ
class domonic.html.listing(*args, **kwargs)ΒΆ
class domonic.html.main(*args, **kwargs)ΒΆ
class domonic.html.mark(*args, **kwargs)ΒΆ
class domonic.html.menu(*args, **kwargs)ΒΆ
class domonic.html.menuitem(*args, **kwargs)ΒΆ
class domonic.html.meta(*args, charset=None, content=None, http_equiv=None, name=None, **kwargs)ΒΆ
class domonic.html.meter(*args, value=None, _min=None, _max=None, low=None, high=None, optimum=None, **kwargs)ΒΆ
class domonic.html.nav(*args, **kwargs)ΒΆ
class domonic.html.noscript(*args, **kwargs)ΒΆ
class domonic.html.ol(*args, **kwargs)ΒΆ
class domonic.html.optgroup(*args, **kwargs)ΒΆ
class domonic.html.option(*args, disabled=None, label=None, selected=None, value=None, **kwargs)ΒΆ
class domonic.html.output(*args, **kwargs)ΒΆ
class domonic.html.p(*args, **kwargs)ΒΆ
class domonic.html.param(*args, **kwargs)ΒΆ
class domonic.html.picture(*args, **kwargs)ΒΆ
class domonic.html.plaintext(*args, **kwargs)ΒΆ
class domonic.html.portal(*args, **kwargs)ΒΆ
class domonic.html.pre(*args, **kwargs)ΒΆ
class domonic.html.progress(*args, **kwargs)ΒΆ
class domonic.html.q(*args, **kwargs)ΒΆ
domonic.html.render(inp, outp='', to=None)[source]ΒΆ

write the input to string or to a file.

Parameters
  • inp (obj) – A domonic tag. For example div()

  • outp (str) – An optional output filename

  • to (str) – An optional output type. if β€˜pyml’ is specified then pyml is returned instead of html.

Returns

A HTML rendered string

Return type

str

class domonic.html.rp(*args, **kwargs)ΒΆ
class domonic.html.rt(*args, **kwargs)ΒΆ
class domonic.html.ruby(*args, **kwargs)ΒΆ
class domonic.html.s(*args, **kwargs)ΒΆ
class domonic.html.samp(*args, **kwargs)ΒΆ
class domonic.html.script(*args, **kwargs)ΒΆ
class domonic.html.section(*args, **kwargs)ΒΆ
class domonic.html.select(*args, autofocus: Optional[bool] = None, disabled: Optional[bool] = None, multiple: Optional[bool] = None, name: Optional[str] = None, required: Optional[bool] = None, size: Optional[int] = None, **kwargs)ΒΆ
class domonic.html.small(*args, **kwargs)ΒΆ
class domonic.html.source(*args, **kwargs)ΒΆ
class domonic.html.span(*args, **kwargs)ΒΆ
class domonic.html.strike(*args, **kwargs)ΒΆ
class domonic.html.strong(*args, **kwargs)ΒΆ
class domonic.html.style(*args, **kwargs)ΒΆ
class domonic.html.sub(*args, **kwargs)ΒΆ
class domonic.html.submit(*args, **kwargs)ΒΆ
class domonic.html.summary(*args, **kwargs)ΒΆ
class domonic.html.sup(*args, **kwargs)ΒΆ
class domonic.html.table(*args, align: Optional[str] = None, bgcolor=None, border=None, cellpadding=None, cellspacing=None, frame=None, rules=None, summary=None, width=None, **kwargs)ΒΆ
class domonic.html.tbody(*args, **kwargs)ΒΆ
class domonic.html.td(*args, **kwargs)ΒΆ
class domonic.html.template(*args, **kwargs)ΒΆ
class domonic.html.textarea(*args, autofocus=None, cols=None, disabled=None, form=None, maxlength=None, name=None, placeholder=None, readonly=None, required=None, rows=None, wrap=None, **kwargs)ΒΆ
class domonic.html.tfoot(*args, **kwargs)ΒΆ
class domonic.html.th(*args, **kwargs)ΒΆ
class domonic.html.thead(*args, **kwargs)ΒΆ
class domonic.html.title(*args, **kwargs)ΒΆ
class domonic.html.tr(*args, **kwargs)ΒΆ
class domonic.html.track(*args, **kwargs)ΒΆ
class domonic.html.u(*args, **kwargs)ΒΆ
class domonic.html.ul(*args, **kwargs)ΒΆ
class domonic.html.var(*args, **kwargs)ΒΆ
class domonic.html.video(*args, autoplay=None, controls=None, height=None, loop=None, muted=None, poster=None, preload=None, src=None, width=None, **kwargs)ΒΆ
class domonic.html.wbr(*args, **kwargs)ΒΆ
class domonic.html.xmp(*args, **kwargs)ΒΆ

domonic.domΒΆ

The DOM represents a document with a logical tree. https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model

class domonic.dom.Attr(name: str, value='', *args, **kwargs)[source]ΒΆ
getNamedItem(name: str)[source]ΒΆ

Returns a specified attribute node from a NamedNodeMap

removeNamedItem(name: str) bool[source]ΒΆ

Removes a specified attribute node

setNamedItem(name: str, value) bool[source]ΒΆ

Sets the specified attribute node (by name)

class domonic.dom.CDATASection(data)[source]ΒΆ
class domonic.dom.CharacterData(*args, **kwargs)[source]ΒΆ

The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren’t any objects of type CharacterData: it is implemented by other interfaces like Text, Comment, or ProcessingInstruction, which aren’t abstract.

after(newChild)ΒΆ

Inserts a newChild node immediately after this ChildNode.

appendData(data)[source]ΒΆ

Appends the given DOMString to the CharacterData.data string; when this method returns, data contains the concatenated DOMString.

before(newChild)ΒΆ

Inserts a newChild node immediately before this ChildNode.

deleteData(offset: int, count: int)[source]ΒΆ

Removes the specified amount of characters, starting at the specified offset, from the CharacterData.data string; when this method returns, data contains the shortened DOMString.

insertData(offset: int, data)[source]ΒΆ

Inserts the specified characters, at the specified offset, in the CharacterData.data string; when this method returns, data contains the modified DOMString.

property nextElementSiblingΒΆ

Returns the next element at the same node tree level

property previousElementSiblingΒΆ

returns the Element immediately prior to the specified one in its parent’s children list, or None if the specified element is the first one in the list.

remove()ΒΆ

Removes this ChildNode from the children list of its parent.

replaceData(offset: int, count: int, data)[source]ΒΆ

Replaces the specified amount of characters, starting at the specified offset, with the specified DOMString; when this method returns, data contains the modified DOMString.

replaceWith(newChild)ΒΆ

Replaces this ChildNode with a new one.

substringData(offset: int, length: int)[source]ΒΆ

Returns a DOMString containing the part of CharacterData.data of the specified length and starting at the specified offset.

class domonic.dom.ChildNode(*args, **kwargs)[source]ΒΆ

not tested yet

after(newChild)[source]ΒΆ

Inserts a newChild node immediately after this ChildNode.

before(newChild)[source]ΒΆ

Inserts a newChild node immediately before this ChildNode.

remove()[source]ΒΆ

Removes this ChildNode from the children list of its parent.

replaceWith(newChild)[source]ΒΆ

Replaces this ChildNode with a new one.

class domonic.dom.Comment(data)[source]ΒΆ
class domonic.dom.DOMConfig[source]ΒΆ

DOMConfig: Not to be confused with the obsolete DOMConfiguration.

This class is used to set some global rules for our dom.

GLOBAL_AUTOESCAPE - If this is set to True, then all text nodes will be automatically escaped. HTML5_MODE - doesn’t render close tags on certain elements HTMX_ENABLED - inludes htmx attributes into domonic for quicker notation

exception domonic.dom.DOMException(code, message: Optional[str] = None)[source]ΒΆ

The DOMException interface represents an anormal event related to the DOM.

class domonic.dom.DOMPoint(x: float, y: float, z: float = 0, w: float = 1)[source]ΒΆ

The DOMPoint interface represents a point specified by x and y coordinates.

class domonic.dom.DOMPointReadOnly(x: float, y: float, z: float = 0, w: float = 1)[source]ΒΆ

The DOMPointReadOnly interface represents a point specified by x and y coordinates.

class domonic.dom.DOMQuad(p1, p2, p3, p4)[source]ΒΆ

The DOMQuad interface represents a quadrilateral on the plane with its four corners represented as Cartesian coordinates.

class domonic.dom.DOMStringMap(*args, **kwargs)[source]ΒΆ

TODO - not tested yet TODO - make this like a dict

delete(name: str) bool[source]ΒΆ

Deletes the item with the specified name

get(name: str)[source]ΒΆ

Returns the value of the item with the specified name

set(name: str, value)[source]ΒΆ

Sets the value of the item with the specified name

class domonic.dom.DOMTimeStamp(value)[source]ΒΆ

The DOMTimeStamp interface represents a numeric value which represents the number of milliseconds since the epoch.

class domonic.dom.DOMTokenList(element: Node)[source]ΒΆ

DOMTokenList represents a set of space-separated tokens.

add(*args)[source]ΒΆ

Adds the given tokens to the list

contains(token) bool[source]ΒΆ

Returns true if the token is in the list, and false otherwise

item(index: int)[source]ΒΆ

Returns the token at the specified index

remove(*args)[source]ΒΆ

Removes the given tokens from the list

toString() str[source]ΒΆ

Returns a string containing all tokens in the list, with spaces separating each token

toggle(token, force=None)[source]ΒΆ

If force is not given, removes token from list if present, otherwise adds token to list. If force is true, adds token to list, and if force is false, removes token from list if present.

class domonic.dom.Document(*args, **kwargs)[source]ΒΆ

The Document interface represents the entire HTML or XML document.

property anchorsΒΆ

[get the anchors in the document]

property appletsΒΆ

Returns a collection of all <applet> elements in the document

property bodyΒΆ

Returns the <body> element in the document

property characterSetΒΆ

Returns the character encoding for the document

property charsetΒΆ

Use characterSet instead.

Type

Returns the character encoding for the document. Deprecated

close()[source]ΒΆ

Closes the output stream previously opened with document.open()

static createAttribute(name)[source]ΒΆ

Creates an attribute node

static createCDATASection(data)[source]ΒΆ

Creates a CDATASection node with the specified data

static createComment(message)[source]ΒΆ

Creates a Comment node with the specified text

static createDocumentFragment(*args)[source]ΒΆ

Creates an empty DocumentFragment node if not content passed. I added args as optional to pass content

static createElement(_type: str, *args, **kwargs)[source]ΒΆ

Creates an Element node

static createElementNS(namespaceURI, qualifiedName, options=None)[source]ΒΆ

Creates an element with the specified namespace URI and qualified name.

static createEntityReference(name)[source]ΒΆ

Creates an EntityReference node with the specified name

static createEvent(event_type=None)[source]ΒΆ

[Creates a new event]

Parameters

event_type ([type], optional) – [description]. Defaults to None.

Returns

[a new event]

Return type

[type]

static createExpression(xpath, nsResolver)[source]ΒΆ

Creates an XPathExpression object for the given XPath string.

static createNodeIterator(root, whatToShow=None, filter=None)[source]ΒΆ

Creates a NodeIterator that can be used to traverse the document tree or subtree under root.

static createProcessingInstruction(target, data)[source]ΒΆ

Creates a ProcessingInstruction node with the specified target and data

static createRange()[source]ΒΆ

Creates a Range

static createTextNode(text)[source]ΒΆ

[Creates a Text node with the specified text.

Parameters

text ([str]) – [the text to be inserted]

Returns

[a new Text node]

Return type

[type]

static createTreeWalker(root, whatToShow=None, filter=None, entityReferenceExpansion=None)[source]ΒΆ

[creates a TreeWalker object]

Parameters
  • root ([type]) – [the root node at which to begin traversal]

  • whatToShow ([type], optional) – [what types of nodes to show]. Defaults to None.

  • filter ([type], optional) – [a NodeFilter or a function to be called for each node]. Defaults to None.

Returns

[a new TreeWalker object]

Return type

[type]

property doctypeΒΆ

Returns the Document Type Declaration associated with the document

domConfig()[source]ΒΆ

Returns the DOMConfig which has settings for how html content is rendered

domain()[source]ΒΆ

Returns the domain name of the server that loaded the document

elementFromPoint(x, y)[source]ΒΆ

Returns the topmost element at the specified coordinates.

elementsFromPoint(x, y)[source]ΒΆ

Returns an array of all elements at the specified coordinates.

property embedsΒΆ

[Returns a collection of all <embed> elements the document]

Returns

[a collection of all <embed> elements the document]

Return type

[type]

evaluate(xpathExpression: str, contextNode: Optional[Node] = None, namespaceResolver=None, resultType=7, result=None)[source]ΒΆ

Evaluates an XPath expression and returns the result.

property formsΒΆ

Returns a collection of all <form> elements in the document

fullscreenElement()[source]ΒΆ

Returns the current element that is displayed in fullscreen mode

fullscreenEnabled()[source]ΒΆ

Returns a Boolean value indicating whether the document can be viewed in fullscreen mode

getElementById(_id)[source]ΒΆ

[Returns the element that has the ID attribute with the specified value]

Parameters

_id ([str]) – [the value of the ID attribute]

Returns

[the element that has the ID attribute with the specified value]

Return type

[type]

getElementsByName(name: str)[source]ΒΆ

[Returns a NodeList containing all elements with a specified name]

Parameters

name (str) – [the name to search for]

Returns

[the matching elements]

Return type

[type]

property head: HTMLHeadElementΒΆ

Returns the <head> element of the document

property imagesΒΆ

Returns a collection of all <img> elements in the document

property implementationΒΆ

Returns the DOMImplementation object that handles this document

importNode(node, deep=False)[source]ΒΆ

Imports a node from another document to this document.

Returns a collection of all <a> and <area> elements in the document that have a href attribute

normalizeDocument()[source]ΒΆ

Removes empty Text nodes, and joins adjacent nodes

open(index='index.html')[source]ΒΆ

Opens an HTML output stream to collect output from document.write()

property pictureInPictureEnabledΒΆ

Returns whether Picture-in-Picture mode is enabled.

renameNode(node, namespaceURI: str, nodename: str)[source]ΒΆ

[Renames the specified node, and returns the renamed node.]

Parameters
  • node ([type]) – [the node to rename]

  • namespaceURI ([type]) – [a namespace URI]

  • nodename ([type]) – [a node name]

Returns

[description]

Return type

[type]

property scriptsΒΆ

[Returns a collection of <script> elements in the document]

Returns

[a collection of <script> elements in the document]

Return type

[type]

strictErrorChecking()[source]ΒΆ

Returns a Boolean value indicating whether to stop on the first error

property title: strΒΆ

[gets the title of the document]

Returns

The title of the document

Return type

[str]

property visibilityStateΒΆ

Returns the visibility state of the document

write(html: str = '')[source]ΒΆ

[writes HTML text to a document

Parameters

html (str, optional) – [the content to write to the document]

writeln(html: str = '')[source]ΒΆ

[writes HTML text to a document, followed by a line break]

Parameters

html (str, optional) – [the content to write to the document]

property xmlversionΒΆ

Returns the version of XML used for the document

class domonic.dom.DocumentFragment(*args)[source]ΒΆ
property attributes: NamedNodeMapΒΆ

Returns a NamedNodeMap of an element’s attributes

getElementById(_id)ΒΆ

[Returns the element that has the ID attribute with the specified value]

Parameters

_id ([str]) – [the value of the ID attribute]

Returns

[the element that has the ID attribute with the specified value]

Return type

[type]

getElementsByTagName(tagName: str) HTMLCollectionΒΆ

[Returns a collection of all child elements with the specified tag name

Parameters

tagName (str) – [a DOMString representing the tag name to match]

Returns

[method returns a live HTMLCollection of elements with the given tag name.]

Return type

[type]

querySelector(query: str)ΒΆ

[Returns the first child element that matches a specified CSS selector(s) of an element]

Parameters

query (str) – [a CSS selector string]

Returns

[an Element object]

Return type

[type]

querySelectorAll(query: str)ΒΆ

[Returns all child elements that matches a specified CSS selector(s) of an element]

Parameters

query (str) – [a CSS selector string]

Returns

[a list of Element objects]

Return type

[type]

replaceChildren(newChildren) None[source]ΒΆ

Replaces the childNodes of the DocumentFragment object.

class domonic.dom.DocumentType(name: str = 'html', publicId: str = '', systemId: str = '')[source]ΒΆ
internalSubset()[source]ΒΆ

A DOMString of the internal subset, or None. Eg β€œ<!ELEMENT foo (bar)>”.

notations() NamedNodeMap[source]ΒΆ

A NamedNodeMap with notations declared in the DTD.

class domonic.dom.Element(*args, **kwargs)[source]ΒΆ

Baseclass for all html tags

append(*args)[source]ΒΆ

Inserts a set of Node objects or DOMString objects after the last child of the Element.

property attributes: NamedNodeMapΒΆ

Returns a NamedNodeMap of an element’s attributes

blur()[source]ΒΆ

Removes focus from an element

property classListΒΆ

Returns the value of the classList attribute of an element

property classNameΒΆ

Sets or returns the value of the className attribute of an element

click()[source]ΒΆ

Simulates a mouse-click on an element

property clientHeightΒΆ

Returns the height of an element, including padding

property clientLeftΒΆ

Returns the width of the left border of an element

property clientTopΒΆ

Returns the width of the top border of an element

property clientWidthΒΆ

Returns the width of an element, including padding

property contentEditable: boolΒΆ

Sets or returns whether an element is editable

property datasetΒΆ

Returns the value of the dataset attribute of an element

property dirΒΆ

returns the value of the dir attribute of an element

exitFullscreen()[source]ΒΆ

Cancels an element in fullscreen mode

firstElementChild()[source]ΒΆ

Returns the first child element of an element

focus()[source]ΒΆ

Sets focus on an element

getAttribute(attribute: str) str[source]ΒΆ

Returns the specified attribute value of an element node

getAttributeNS(namespaceURI, localName)[source]ΒΆ

Returns the value of the specified attribute

getAttributeNode(attribute: str) str[source]ΒΆ

Returns the specified attribute node

getAttributeNodeNS(attr)[source]ΒΆ

Sets the attribute node of an element

getBoundingClientRect()[source]ΒΆ

Returns the size of an element and its position relative to the viewport

getElementsByClassName(className: str) HTMLCollection[source]ΒΆ

[Returns a collection of all child elements with the specified class name]

Parameters

className (str) – [a DOMString representing the class name to match]

Returns

[a NodeList of all child elements with the specified class name]

Return type

[type]

getElementsBySelector(all_selectors, document)[source]ΒΆ

Get DOM elements based on the given CSS Selector https://simonwillison.net/2003/Mar/25/getElementsBySelector/ < original author http://www.openjs.com/scripts/dom/css_selector/ < ported to support β€˜,’ https://bin-co.com/python/scripts/getelementsbyselector-html-css-query.php < ported to py2 (broken/bugs) BSD LICENSED

note - always needs a tag in the query i.e. (β€˜a.classname’) will work. but just (β€˜.classname’) wont

fixed and ported to py3 here. quite cool means other peoples code works on my dom # TODO - needs to work in conjuctions with _matchElement so querySelector works a bit better and dQuery picks it up # TOOD - *= node content

Parameters
  • all_selectors ([type]) – [description]

  • document ([type]) – [description]

Returns

[description]

Return type

[type]

getElementsByTagName(tagName: str) HTMLCollection[source]ΒΆ

[Returns a collection of all child elements with the specified tag name

Parameters

tagName (str) – [a DOMString representing the tag name to match]

Returns

[method returns a live HTMLCollection of elements with the given tag name.]

Return type

[type]

hasAttribute(attribute: str) bool[source]ΒΆ

Returns True if an element has the specified attribute, otherwise False

Parameters

attribute (str) – [the attribute to test for]

Returns

[True if an element has the specified attribute, otherwise False]

Return type

bool

hasAttributes() bool[source]ΒΆ

Returns true if an element has any attributes, otherwise false

property idΒΆ

Sets or returns the value of the id attribute of an element

property innerHTMLΒΆ

Sets or returns the content of an element

insertAdjacentElement(position: str, element)[source]ΒΆ

Inserts an element adjacent to the current element

insertAdjacentHTML(position: str, html: str)[source]ΒΆ

Inserts raw HTML adjacent to the current element

insertAdjacentText(position: str, text: str)[source]ΒΆ

Inserts text adjacent to the current element

isContentEditable() bool[source]ΒΆ

Returns true if the content of an element is editable, otherwise false

lastElementChild()[source]ΒΆ

[Returns the last child element of an element]

Returns

[the last child element of an element]

Return type

[type]

matches(s: str) bool[source]ΒΆ

[checks to see if the Element would be selected by the provided selectorString]

https://developer.mozilla.org/en-US/docs/Web/API/Element/matches

Parameters

s (str) – [css selector]

Returns

[True if selector maches Element otherwise False]

Return type

[bool]

namespaceURI()[source]ΒΆ

Returns the namespace URI of an element

property nextElementSiblingΒΆ

Returns the next element at the same node tree level

property nextSiblingΒΆ

Returns the next node at the same node tree level

normalize()[source]ΒΆ

Joins adjacent text nodes and removes empty text nodes in an element

offsetHeight()[source]ΒΆ

Returns the height of an element, including padding, border and scrollbar

offsetLeft()[source]ΒΆ

Returns the horizontal offset position of an element

offsetParent()[source]ΒΆ

Returns the offset container of an element

offsetTop()[source]ΒΆ

Returns the vertical offset position of an element

offsetWidth()[source]ΒΆ

Returns the width of an element, including padding, border and scrollbar

property parentElementΒΆ

Returns the parent element node of an element

prepend(*args)[source]ΒΆ

Prepends a node to the current element

property previousElementSiblingΒΆ

returns the Element immediately prior to the specified one in its parent’s children list, or None if the specified element is the first one in the list.

querySelector(query: str)[source]ΒΆ

[Returns the first child element that matches a specified CSS selector(s) of an element]

Parameters

query (str) – [a CSS selector string]

Returns

[an Element object]

Return type

[type]

querySelectorAll(query: str)[source]ΒΆ

[Returns all child elements that matches a specified CSS selector(s) of an element]

Parameters

query (str) – [a CSS selector string]

Returns

[a list of Element objects]

Return type

[type]

remove()[source]ΒΆ

Removes the element from the DOM

removeAttribute(attribute: str)[source]ΒΆ

Removes a specified attribute from an element

removeAttributeNS(namespaceURI, localName)[source]ΒΆ

Removes an attribute from an element

removeAttributeNode(attribute)[source]ΒΆ

Removes a specified attribute node, and returns the removed node

requestFullscreen()[source]ΒΆ

Shows an element in fullscreen mode

scrollHeight()[source]ΒΆ

Returns the entire height of an element, including padding

scrollIntoView()[source]ΒΆ

Scrolls the specified element into the visible area of the browser window

scrollLeft()[source]ΒΆ

Sets or returns the number of pixels an element’s content is scrolled horizontally

scrollTop()[source]ΒΆ

Sets or returns the number of pixels an element’s content is scrolled vertically

scrollWidth()[source]ΒΆ

Returns the entire width of an element, including padding

setAttribute(attribute, value)[source]ΒΆ

Sets or changes the specified attribute, to the specified value

setAttributeNS(namespaceURI, localName, value)[source]ΒΆ

Sets an attribute in the given namespace

setAttributeNode(attr)[source]ΒΆ

[Sets or changes the specified attribute node]

Parameters

attr ([type]) – [an Attr object]

setAttributeNodeNS(attr)[source]ΒΆ

Sets the attribute node of an element

property styleΒΆ

returns the value of the style attribute of an element

property titleΒΆ

returns the value of the title attribute of an element

toString() str[source]ΒΆ

Converts an element to a string

class domonic.dom.Entity(*args)[source]ΒΆ
static fromChar(char: str) str[source]ΒΆ

Returns the character corresponding to the given entity name.

static fromName(entityName: str) str[source]ΒΆ

Returns the entity name corresponding to the given character.

class domonic.dom.EntityReference(*args)[source]ΒΆ

The EntityReference interface represents a reference to an entity, either parsed or unparsed, in an Entity Node. Note that this is not a CharacterData node, and does not have any child nodes.

static fromOrdinal(ordinal: int)[source]ΒΆ

Returns the entity name corresponding to the given character.

static ordinal(entityName: str)[source]ΒΆ

Returns the character corresponding to the given entity name.

class domonic.dom.HTMLAnchorElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLAreaElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLAudioElement(*args, autoplay: Optional[bool] = None, controls=None, loop=None, muted=None, preload=None, src=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLBRElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLBaseElement(*args, href=None, target=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLBaseFontElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLBodyElement(*args, aLink=None, background=None, bgColor=None, link=None, onload=None, onunload=None, text=None, vLink=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLButtonElement(*args, disabled: Optional[bool] = None, form=None, formaction: Optional[str] = None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, name=None, type=None, value=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLCanvasElement(*args, width: Optional[int] = None, height: Optional[int] = None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLCollection(iterable=(), /)[source]ΒΆ
item(index: int)[source]ΒΆ

[gets the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.]

Parameters

index ([type]) – [the index of the item to return.]

Returns

[the node at the indexth position, or None]

Return type

[type]

namedItem(name: str)[source]ΒΆ

Returns the specific node whose ID or, as a fallback, name matches the string specified by name.

class domonic.dom.HTMLContentElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLDListElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLDataElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLDataListElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLDialogElement(*args, open=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLDivElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLDocument(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLEmbedElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLFieldSetElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLFormControlsCollection(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLFormElement(*args, action: Optional[str] = None, autocomplete=None, enctype: Optional[str] = None, method: Optional[str] = None, name: Optional[str] = None, novalidate: Optional[bool] = None, target=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLFrameSetElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLHRElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLHeadElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLHeadingElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLIFrameElement(*args, src=None, name=None, sandbox=None, allowfullscreen=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLImageElement(*args, alt=None, src=None, crossorigin=None, height=None, ismap=None, longdesc=None, sizes=None, srcset=None, usemap=None, width=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLInputElement(*args, accept=None, alt=None, autocomplete=None, autofocus=None, checked=None, dirname=None, disabled=None, form=None, formaction=None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, height=None, _list=None, _max=None, maxlength=None, _min=None, multiple=None, name=None, pattern=None, placeholder=None, readonly=None, required=None, size=None, src=None, step=None, type=None, value=None, width=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLIsIndexElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLKeygenElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLLIElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLLabelElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLLegendElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLLinkElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLMapElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLMediaElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLMetaElement(*args, charset=None, content=None, http_equiv=None, name=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLMeterElement(*args, value=None, _min=None, _max=None, low=None, high=None, optimum=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLModElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLOListElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLObjectElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLOptGroupElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLOptionElement(*args, disabled=None, label=None, selected=None, value=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLOutputElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLParagraphElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLParamElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLPictureElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLPortalElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLPreElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLProgressElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLQuoteElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLScriptElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLSelectElement(*args, autofocus: Optional[bool] = None, disabled: Optional[bool] = None, multiple: Optional[bool] = None, name: Optional[str] = None, required: Optional[bool] = None, size: Optional[int] = None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLShadowElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLSourceElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLSpanElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLStyleElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableCaptionElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableCellElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableColElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableDataCellElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableElement(*args, align: Optional[str] = None, bgcolor=None, border=None, cellpadding=None, cellspacing=None, frame=None, rules=None, summary=None, width=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableHeaderCellElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableRowElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTableSectionElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTemplateElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTextAreaElement(*args, autofocus=None, cols=None, disabled=None, form=None, maxlength=None, name=None, placeholder=None, readonly=None, required=None, rows=None, wrap=None, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTimeElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTitleElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLTrackElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLUListElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLUnknownElement(*args, **kwargs)[source]ΒΆ
class domonic.dom.HTMLVideoElement(*args, autoplay=None, controls=None, height=None, loop=None, muted=None, poster=None, preload=None, src=None, width=None, **kwargs)[source]ΒΆ
class domonic.dom.Node(*args, **kwargs)[source]ΒΆ

An abstract base class upon which many other DOM API objects are based

appendChild(aChild: Node) Node[source]ΒΆ

Adds a child to the current element. If item is a DocumentFragment, all its children are added.

Parameters

item (Node) – The Node to add.

property attribΒΆ

Returns the attributes of the current node as a dict not a NamedNodeMap

property childElementCount: intΒΆ

Returns the number of child elements an element has

property childNodes: NodeListΒΆ

Returns a live NodeList containing all the children of this node

property childrenΒΆ

Returns a collection of an element’s child element (excluding text and comment nodes)

cloneNode(deep: bool = True)[source]ΒΆ

Returns a copy.

compareDocumentPosition(otherElement) int[source]ΒΆ

An integer value representing otherNode’s position relative to node as a bitmask combining the following constant properties of Node:

https://stackoverflow.com/questions/8334286/cross-browser-compare-document-position

contains(node)[source]ΒΆ

Check whether a node is a descendant of a given node

property firstChildΒΆ

Returns the first child node of an element

hasChildNodes() bool[source]ΒΆ

Returns true if an element has any child nodes, otherwise false

insertBefore(new_node, reference_node=None)[source]ΒΆ

inserts a node before a reference node as a child of a specified parent node. this will remove the node from its previous parent node, if any.

# TODO - can throw value error if wrong ordered params. may be helpful to catch to say so.

isDefaultNamespace(ns)[source]ΒΆ

Checks if a namespace is the default namespace

isEqualNode(node)[source]ΒΆ

Checks if two elements are equal

isSameNode(node)[source]ΒΆ

Checks if two elements are the same node

iter(tag=None)[source]ΒΆ

Creates a tree iterator with the current element as the root. The iterator iterates over this element and all elements below it, in document (depth first) order. If tag is not None or β€˜*’, only elements whose tag equals tag are returned from the iterator. If the tree structure is modified during iteration, the result is undefined.

property lastChildΒΆ

Returns the last child node of an element

lookupNamespaceURI(ns: str)[source]ΒΆ

Returns the namespace URI for a given prefix

Parameters

ns – prefix - i.e β€˜xml’, β€˜xlink’, β€˜svg’, etc

lookupPrefix(ns)[source]ΒΆ

Returns the prefix for a given namespace URI

property nextSiblingΒΆ

[returns the next sibling of the current node.]

property nodeNameΒΆ

Returns the name of a node

property nodeValueΒΆ

Sets or returns the value of a node

normalize()[source]ΒΆ

Normalize a node’s value

property ownerDocumentΒΆ

Returns the root element (document object) for an element

property previousSiblingΒΆ

[returns the previous sibling of the current node.]

removeChild(node)[source]ΒΆ

removes a child node from the DOM and returns the removed node.

replaceChild(newChild, oldChild)[source]ΒΆ

[Replaces a child node within the given (parent) node.]

Parameters
  • newChild ([type]) – [a Node object]

  • oldChild ([type]) – [a Node object]

Returns

[the old child node]

Return type

[type]

property rootNodeΒΆ

[read-only property returns a Node object representing the topmost node in the tree, or the current node if it’s the topmost node in the tree]

Returns

[the topmost Node in the tree]

Return type

[Node]

property tagΒΆ

Returns the tag name of the current node

property tailΒΆ

Returns the text content of the current node

property textΒΆ

Returns the text content of the current node

property textContentΒΆ

Returns the text content of a node and its descendants

class domonic.dom.NodeIterator(root, whatToShow=4294967295, filter=None, entityReferenceExpansion=False)[source]ΒΆ

[NodeIterator is an iterator object that iterates over the descendants of a node, in tree order.]

nextNode()[source]ΒΆ

Returns the next Node in the document, or null if there are none.

pointerBeforeReferenceNode() bool[source]ΒΆ

Returns a boolean flag that indicates whether the NodeIterator is anchored before, the flag being true, or after, the flag being false, the anchor node.

previousNode()[source]ΒΆ

Returns the previous Node in the document, or null if there are none.

referenceNode() Node[source]ΒΆ

Returns the Node that is being iterated over.

class domonic.dom.NodeList(iterable=(), /)[source]ΒΆ

NodeList objects are collections of nodes

entries() Iterable[Tuple[int, Node]][source]ΒΆ

Returns an iterator, allowing code to go through all key/value pairs contained in the collection. (In this case, the keys are numbers starting from 0 and the values are nodes.

forEach(func, thisArg=None) None[source]ΒΆ

Calls a function for each item in the NodeList.

item(index) Node[source]ΒΆ

Returns an item in the list by its index, or null if the index is out-of-bounds.

keys() Iterable[int][source]ΒΆ

Returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection. (In this case, the keys are numbers starting from 0.)

values() Iterable[Node][source]ΒΆ

Returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.

class domonic.dom.ParentNode(*args, **kwargs)[source]ΒΆ

not tested yet

property children: NodeListΒΆ

Return list of child nodes.

property firstElementChildΒΆ

First Element child node.

property lastElementChildΒΆ

Last Element child node.

class domonic.dom.ProcessingInstruction(target, data)[source]ΒΆ
class domonic.dom.RadioNodeList(name: str)[source]ΒΆ
property valueΒΆ

Returns the value of the first element in the collection, or null if there are no elements in the collection.

class domonic.dom.ShadowRoot(host, mode='open')[source]ΒΆ

property on element that has hidden DOM

caretPositionFromPoint()[source]ΒΆ

Returns a CaretPosition object containing the DOM node containing the caret, and caret’s character offset within that node.

elementFromPoint(x, y)[source]ΒΆ

Returns the topmost element at the specified coordinates.

elementsFromPoint(x, y)[source]ΒΆ

Returns an array of all elements at the specified coordinates.

getSelection()[source]ΒΆ

Returns a Selection object representing the range of text selected by the user, or the current position of the caret.

class domonic.dom.Text(*args, **kwargs)[source]ΒΆ

Text Node

property assignedSlotΒΆ

Returns the slot whose assignedNodes contains this node.

property childNodesΒΆ

Returns a live NodeList containing all the children of this node

property firstChildΒΆ

Returns the first child node of an element

property nodeNameΒΆ

Returns the name of a node

splitText(offset: int)[source]ΒΆ

Splits the Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. The first node is returned, while the second node is discarded and exists outside the tree.

property wholeTextΒΆ

Returns a DOMString containing all the text content of the node and its descendants.

class domonic.dom.TreeWalker(node, whatToShow=4294967295, _filter=None, expandEntityReferences=False)[source]ΒΆ

The TreeWalker object represents the nodes of a document subtree and a position within them.

firstChild()[source]ΒΆ

Moves the current Node to the first visible child of the current node, and returns the found child. It also moves the current node to this child. If no such child exists, returns null and the current node is not changed.

lastChild()[source]ΒΆ

Moves the current Node to the last visible child of the current node, and returns the found child. It also moves the current node to this child. If no such child exists, null is returned and the current node is not changed.

nextNode()[source]ΒΆ

Moves the current Node to the next visible node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, returns None and the current node is not changed. can be used in a while loop to iterate over all the nodes in the document order.

nextSibling()[source]ΒΆ

Moves the current Node to its next sibling, if any, and returns the found sibling. If there is no such node, null is returned and the current node is not changed.

parentNode()[source]ΒΆ

Moves the current Node to the first visible ancestor node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed.

previousNode()[source]ΒΆ

Moves the current Node to the previous visible node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed.

previousSibling()[source]ΒΆ

Moves the current Node to its previous sibling, if any, and returns the found sibling. If there is no such node, return null and the current node is not changed.

property rootΒΆ

Returns a Node representing the root node as specified when the TreeWalker was created.

treeΒΆ

Is a boolean value indicating, when discarding an entity reference its whole sub-tree must be discarded at the same time.

whatToShow(options)[source]ΒΆ

Returns an unsigned long being a bitmask made of constants describing the types of Node that must be presented. Non-matching nodes are skipped, but their children may be included, if relevant. The possible values are:

domonic.dom.consoleΒΆ

# self.screen = type(β€˜screen’, (DOM,), {β€˜name’:’screen’})

domonic.javascriptΒΆ

class domonic.javascript.Array(*args)[source]ΒΆ

javascript array

at(index: int)[source]ΒΆ

[takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.]

Parameters

index ([type]) – [position of item]

Returns

[item at the given position]

Return type

[type]

concat(*args)[source]ΒΆ

[Joins two or more arrays, and returns a copy of the joined arrays]

Returns

[returns a copy of the joined arrays]

Return type

[list]

copyWithin(target, start=0, end=None)[source]ΒΆ

Copies array elements within the array, from start to end

entries()[source]ΒΆ

[Returns a key/value pair Array Iteration Object]

Yields

[type] – [key/value pair]

every(func)[source]ΒΆ

[Checks if every element in an array pass a test]

Parameters

func ([type]) – [test function]

Returns

[if every array elemnt passed the test]

Return type

[bool]

fill(value=None, start=None, end=None)[source]ΒΆ

[Fills elements of an array from a start index to an end index with a static value]

filter(func)[source]ΒΆ

Creates a new array with every element in an array that pass a test i.e. even_numbers = someArr.filter( lambda x: x % 2 == 0 )

find(func)[source]ΒΆ

Returns the value of the first element in an array that pass a test

findIndex(value)[source]ΒΆ

Returns the index of the first element in an array that pass a test

findLast(callback)[source]ΒΆ

[Returns the last element in an array that passes a test]

findLastIndex(callback)[source]ΒΆ

[Returns the last index of an element in an array that passes a test]

flat(depth=1)[source]ΒΆ

[Flattens an array into a single-dimensional array or a depth of arrays]

flatMap(fn)[source]ΒΆ

[Maps a function over an array and flattens the result]

forEach(func)[source]ΒΆ

Calls a function for each array element

static from_(obj)[source]ΒΆ

Creates a new Array instance from an array-like or iterable object.

groupBy(callback) dict[source]ΒΆ

[Groups the elements of an array according to the result of calling a callback function on each element]

Parameters

callback (callable) – [the callback recieves the following paramters(value, index, target)]

Returns

[a dictionary of arrays]

Return type

[dict]

includes(value)[source]ΒΆ

[Check if an array contains the specified item

Parameters

value ([any]) – [any value]

Returns

[a boolean]

Return type

[bool]

indexOf(value)[source]ΒΆ

Search the array for an element and returns its position

static isArray(thing)[source]ΒΆ

[Checks whether an object is an array]

Parameters

thing ([type]) – [thing to check]

Returns

[True if the object is list, tuple or Array]

Return type

[bool]

join(value)[source]ΒΆ

Joins all elements of an array into a string

keys()[source]ΒΆ

Returns a Array Iteration Object, containing the keys of the original array

lastIndexOf(value)[source]ΒΆ

Search the array for an element, starting at the end, and returns its position

property lengthΒΆ

Sets or returns the number of elements in an array

map(func)[source]ΒΆ

[Creates a new array with the result of calling a function for each array element]

Parameters

func ([type]) – [a function to call on each array element]

Returns

[a new array]

Return type

[list]

static of(*args)[source]ΒΆ

Creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments.

pop()[source]ΒΆ

Removes the last element of an array, and returns that element

prototypeΒΆ

alias of Array

push(value)[source]ΒΆ

Adds new elements to the end of an array, and returns the new length

reduce(callback, initialValue=None)[source]ΒΆ

Reduces the array to a single value (going left-to-right) callback recieve theses parameters: previousValue, currentValue, currentIndex, array

reduceRight(callback, initialValue=None)[source]ΒΆ

Reduces the array to a single value (going right-to-left) callback recieve theses parameters: previousValue, currentValue, currentIndex, array

reverse()[source]ΒΆ

Reverses the order of the elements in an array

shift()[source]ΒΆ

[removes the first element from an array and returns that removed element]

Returns

[the removed array element]

Return type

[type]

slice(start=0, stop=None, step=1)[source]ΒΆ

[Selects a part of an array, and returns the new array]

Parameters
  • start ([int]) – [index to slice from]

  • stop ([int], optional) – [index to slice to]. Defaults to end of the array.

  • step (int, optional) – [description]. Defaults to 1.

Returns

[new array]

Return type

[type]

some(func)[source]ΒΆ

Checks if any of the elements in an array pass a test

sort(func=None)[source]ΒΆ

Sorts the elements of an array

splice(start, delete_count=None, *items)[source]ΒΆ

Selects a part of an array, and returns the new array

toSource()[source]ΒΆ

Returns the source array.

toString()[source]ΒΆ

Converts an array to a string, and returns the result

unshift(*args)[source]ΒΆ

[Adds new elements to the beginning of an array, and returns the new length]

Returns

[the length of the array]

Return type

[int]

class domonic.javascript.Boolean(value=False)[source]ΒΆ

[Creates a Boolean Object. Warning this is NOT a boolean type. for that use Global.Boolean()]

class domonic.javascript.Date(date=None, *args, formatter='python', **kwargs)[source]ΒΆ

javascript date

UTC()[source]ΒΆ

Returns the number of milliseconds in a date since midnight of January 1, 1970, according to UTC time

getDate()[source]ΒΆ

Returns the day of the month (from 1-31)

getDay()[source]ΒΆ

Returns the day of the week (from 0-6 : Sunday-Saturday)

Returns

An integer number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on

Return type

int

getFullYear()[source]ΒΆ

Returns the year

getHours()[source]ΒΆ

Returns the hour (from 0-23)

getMilliseconds()[source]ΒΆ

Returns the milliseconds (from 0-999)

getMinutes()[source]ΒΆ

Returns the minutes (from 0-59)

getMonth()[source]ΒΆ

Returns the month (from 0-11)

getSeconds()[source]ΒΆ

Returns the seconds (from 0-59)

getTime()[source]ΒΆ

Returns A number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and self.date

getTimezoneOffset()[source]ΒΆ

Returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone

getUTCDate()[source]ΒΆ

Returns the day of the month, according to universal time (from 1-31)

getUTCDay()[source]ΒΆ

Returns the day of the week, according to universal time (from 0-6)

getUTCFullYear()[source]ΒΆ

Returns the year, according to universal time

getUTCHours()[source]ΒΆ

Returns the hour, according to universal time (from 0-23)

getUTCMilliseconds()[source]ΒΆ

Returns the milliseconds, according to universal time (from 0-999)

getUTCMinutes()[source]ΒΆ

Returns the minutes, according to universal time (from 0-59)

getUTCMonth()[source]ΒΆ

Returns the month, according to universal time (from 0-11)

getUTCSeconds()[source]ΒΆ

Returns the seconds, according to universal time (from 0-59)

getYear()[source]ΒΆ

Deprecated. Use the getFullYear() method instead

static now()[source]ΒΆ

Returns the number of milliseconds since midnight Jan 1, 1970

static parse(date_string)[source]ΒΆ

Parses a date string and returns the number of milliseconds since January 1, 1970

setDate(day: int)[source]ΒΆ

Sets the day of the month of a date object

Parameters

day (int) – An integer representing the day of the month.

Returns

milliseconds between epoch and updated date.

Return type

int

setFullYear(yearValue: int, monthValue: Optional[int] = None, dateValue: Optional[int] = None)[source]ΒΆ

Sets the year of a date object

Parameters
  • yearValue (_type_) – _description_

  • monthValue (int, optional) – _description_. Defaults to None.

  • dateValue (int, optional) – _description_. Defaults to None.

Returns

milliseconds between epoch and updated date.

Return type

int

setHours(hoursValue: int, minutesValue: Optional[int] = None, secondsValue: Optional[int] = None, msValue: Optional[int] = None)[source]ΒΆ

Sets the hour of a date object

Parameters
  • hoursValue (int) – an integer between 0 and 23

  • minutesValue (int, optional) – an integer between 0 and 59

  • secondsValue (int, optional) – an integer between 0 and 59,

  • msValue (int, optional) – a number between 0 and 999,

Returns

milliseconds between epoch and updated date.

Return type

int

setMilliseconds(milliseconds: int)[source]ΒΆ

Sets the milliseconds of a date object

Parameters

milliseconds (int) – Milliseconds to set i.e 123

setMinutes(minutesValue: int, secondsValue: Optional[int] = None, msValue: Optional[int] = None)[source]ΒΆ

Set the minutes of a date object

Parameters
  • minutesValue (int, optional) – an integer between 0 and 59

  • secondsValue (int, optional) – an integer between 0 and 59,

  • msValue (int, optional) – a number between 0 and 999,

Returns

milliseconds between epoch and updated date.

Return type

int

setMonth(monthValue: int, dayValue: Optional[int] = None)[source]ΒΆ

Sets the month of a date object

Parameters
  • monthValue (int) – a number from 0 to 11 indicating the month.

  • dayValue (int, optional) – an optional day of the month. Defaults to 0.

Returns

milliseconds between epoch and updated date.

Return type

int

setSeconds(secondsValue: int, msValue: Optional[int] = None)[source]ΒΆ

Sets the seconds of a date object

Parameters
  • secondsValue (int) – _description_

  • msValue (int, optional) – _description_. Defaults to None.

Returns

milliseconds between epoch and updated date.

Return type

int

setTime(milliseconds: Optional[int] = None)[source]ΒΆ

Sets the date and time of a date object

Parameters

milliseconds (_type_, optional) – _description_. Defaults to None.

Returns

_description_

Return type

_type_

setUTCDate(day)[source]ΒΆ

Sets the day of the month of a date object, according to universal time

setUTCFullYear(year)[source]ΒΆ

Sets the year of a date object, according to universal time

setUTCHours(hour)[source]ΒΆ

Sets the hour of a date object, according to universal time

setUTCMilliseconds(milliseconds)[source]ΒΆ

Sets the milliseconds of a date object, according to universal time

setUTCMinutes(minutes)[source]ΒΆ

Set the minutes of a date object, according to universal time

setUTCMonth(month)[source]ΒΆ

Sets the month of a date object, according to universal time

setUTCSeconds(seconds)[source]ΒΆ

Set the seconds of a date object, according to universal time

setYear(year)[source]ΒΆ

Deprecated. Use the setFullYear() method instead

toDateString()[source]ΒΆ

Converts the date portion of a Date object into a readable string

toGMTString()[source]ΒΆ

Deprecated. Use the toUTCString() method instead

toISOString()[source]ΒΆ

Returns the date as a string, using the ISO standard

toJSON()[source]ΒΆ

Returns the date as a string, formatted as a JSON date

toLocaleDateString()[source]ΒΆ

Returns the date portion of a Date object as a string, using locale conventions

toLocaleString()[source]ΒΆ

Converts a Date object to a string, using locale conventions

toLocaleTimeString()[source]ΒΆ

Returns the time portion of a Date object as a string, using locale conventions

toString()[source]ΒΆ

Returns a string representation of the date

toTimeString()[source]ΒΆ

Converts the time portion of a Date object to a string

toUTCString()[source]ΒΆ

Converts a Date object to a string, according to universal time

exception domonic.javascript.Error(message, *args, **kwargs)[source]ΒΆ

Raise Errors

class domonic.javascript.Function(func, *args, **kwargs)[source]ΒΆ

a Function object

apply(thisArg=None, args=None, **kwargs)[source]ΒΆ

[calls a function with a given this value, and arguments provided as an array]

Parameters

thisArg ([type]) – [The value of this provided for the call to func.]

Returns

[result of calling the function.]

Return type

[type]

bind(thisArg, *args, **kwargs)[source]ΒΆ

[creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.]

Parameters
  • thisArg ([type]) – [The value to be passed as the this parameter to the target

  • called.] (function func when the bound function is) –

Returns

[A copy of the given function with the specified this value, and initial arguments (if provided).]

Return type

[type]

call(thisArg=None, *args, **kwargs)[source]ΒΆ

[calls a function with a given this value and arguments provided individually.]

Parameters

thisArg ([type]) – [description]

Returns

[result of calling the function.]

Return type

[type]

toString()[source]ΒΆ

[Returns a string representing the source code of the function. Overrides the]

class domonic.javascript.Global[source]ΒΆ

javascript global methods

NaN()[source]ΒΆ

β€œNot-a-Number” value

static Number(x)[source]ΒΆ

Converts an object’s value to a number

static String(x)[source]ΒΆ

Converts an object’s value to a string

static clearTimeout(timeoutID)[source]ΒΆ

[cancels a timer set with setTimeout()]

Parameters

timeoutID ([str]) – [the identifier returned by setTimeout()]

static decodeURI(x)[source]ΒΆ

Decodes a URI

static decodeURIComponent(x)[source]ΒΆ

Decodes a URI component

static encodeURI(x)[source]ΒΆ

Encodes a URI

static encodeURIComponent(x)[source]ΒΆ

Encodes a URI component

static eval(pythonstring)[source]ΒΆ

Evaluates a string and executes it as if it was script code

static isFinite(x) bool[source]ΒΆ

Returns true if x is a finite number

static isNaN(x)[source]ΒΆ

Determines whether a value is an illegal number

static parseFloat(x: str)[source]ΒΆ

Parses a string and returns a floating point number

static parseInt(x: str)[source]ΒΆ

Parses a string and returns an integer

static require(path: str)[source]ΒΆ

Loads a script from a file

static setTimeout(callback, t, *args, **kwargs)[source]ΒΆ

[sets a timer which executes a function or evaluates an expression after a specified delay]

Parameters
  • callback (function) – [method to be executed after the delay]

  • t ([int]) – [milliseconds]

Returns

[an identifier for the timer]

Return type

[str]

undefined()[source]ΒΆ

Indicates that a variable has not been assigned a value

class domonic.javascript.Job(interval, execute, *args, **kwargs)[source]ΒΆ
run()[source]ΒΆ

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class domonic.javascript.Map(collection)[source]ΒΆ

Map holds key-value pairs and remembers the original insertion order of the keys.

clear()[source]ΒΆ

Removes all key-value pairs from the Map object.

delete(key: str) bool[source]ΒΆ

Returns true if an element in the Map object existed and has been removed, or false if the element does not exist. Map.prototype.has(key) will return false afterwards.

entries()[source]ΒΆ

Returns a new Iterator object that contains an array of [key, value] for each element in the Map object in insertion order.

get(key: str, default=None)[source]ΒΆ

Returns the value associated to the key, or undefined if there is none.

has(key: str) bool[source]ΒΆ

Returns a boolean asserting whether a value has been associated to the key in the Map object or not.

keys()[source]ΒΆ

Returns a new Iterator object that contains the keys for each element in the Map object in insertion order.

set(key: str, value)[source]ΒΆ

Sets the value for the key in the Map object. Returns the Map object.

values()[source]ΒΆ

Returns a new Iterator object that contains the values for each element in the Map object in insertion order.

class domonic.javascript.Math(obj=None, *args, **kwargs)[source]ΒΆ

Math class that mirrors javascript implementation.

i.e. you can pass strings and it will also work, Math.abs(β€˜-1’)

static hypot(*args)[source]ΒΆ

returns the square root of the sum of squares of its arguments

static log2(*args)[source]ΒΆ

returns the square root of the sum of squares of its arguments

static loglp(*args)[source]ΒΆ

returns the natural logarithm (base e) of 1 + a number, that is

class domonic.javascript.Number(x='', *args, **kwargs)[source]ΒΆ

javascript Number methods

NEGATIVE_INFINITY = infΒΆ

Represents negative infinity (returned on overflow) Number

POSITIVE_INFINITY = -infΒΆ

Represents infinity (returned on overflow) Number

isInteger()[source]ΒΆ

Checks whether a value is an integer

isSafeInteger()[source]ΒΆ

Checks whether a value is a safe integer

toExponential(num=None)[source]ΒΆ

Converts a number into an exponential notation

toFixed(digits: int)[source]ΒΆ

[formats a number using fixed-point notation.]

Parameters

digits ([int]) – [The number of digits to appear after the decimal point

Returns

[A string representing the given number using fixed-point notation.]

Return type

[str]

toPrecision(precision)[source]ΒΆ

[returns a string representing the Number object to the specified precision.]

Parameters

precision ([int]) – [An integer specifying the number of significant digits.]

Returns

[A string representing a Number object in fixed-point or exponential notation rounded to precision significant digits]

Return type

[str]

toString(base: int)[source]ΒΆ

[returns a string representing the specified Number object.]

Parameters

base (int) – [An integer in the range 2 through 36 specifying the base to use for representing numeric values.]

Returns

[a string representing the specified Number object]

Return type

[str]

exception domonic.javascript.ProgramKilled[source]ΒΆ
class domonic.javascript.Reflect[source]ΒΆ

The Reflect object provides the following static functions which have the same names as the proxy handler methods. Some of these methods are also the same as corresponding methods on Object, although they do have some subtle differences between them.

static apply(target, thisArgument, argumentsList)[source]ΒΆ

Calls a target function with arguments as specified by the argumentsList parameter. See also Function.prototype.apply().

static construct(target, argumentsList, newTarget)[source]ΒΆ

The new operator as a function. Equivalent to calling new target(…argumentsList). Also provides the option to specify a different prototype.

static defineProperty(target, propertyKey, attributes)[source]ΒΆ

Similar to Object.defineProperty(). Returns a Boolean that is true if the property was successfully defined.

static deleteProperty(target, propertyKey)[source]ΒΆ

The delete operator as a function. Equivalent to calling delete target[propertyKey].

static get(target, propertyKey, receiver)[source]ΒΆ

Returns the value of the property. Works like getting a property from an object (target[propertyKey]) as a function.

static getOwnPropertyDescriptor(target, propertyKey)[source]ΒΆ

Similar to Object.getOwnPropertyDescriptor(). Returns a property descriptor of the given property if it exists on the object, undefined otherwise.

getPrototypeOf()ΒΆ

Returns the prototype (internal [[Prototype]] property) of the specified object.

static has(target, propertyKey)[source]ΒΆ

Returns a Boolean indicating whether the target has the property. Either as own or inherited. Works like the in operator as a function.

static ownKeys(target)[source]ΒΆ

Returns an array of the target object’s own (not inherited) property keys.

static preventExtensions(target)[source]ΒΆ

Similar to Object.preventExtensions(). Returns a Boolean that is true if the update was successful.

static set(target, propertyKey, value, receiver)[source]ΒΆ

A function that assigns values to properties. Returns a Boolean that is true if the update was successful.

static setPrototypeOf(target, prototype)[source]ΒΆ

A function that sets the prototype of an object. Returns a Boolean that is true if the update was successful.

class domonic.javascript.Screen[source]ΒΆ

screen

availHeight()[source]ΒΆ

Returns the height of the screen (excluding the Windows Taskbar)

availWidth()[source]ΒΆ

Returns the width of the screen (excluding the Windows Taskbar)

colorDepth()[source]ΒΆ

Returns the colorDepth

height()[source]ΒΆ

Returns the total height of the screen

pixelDepth()[source]ΒΆ

Returns the pixelDepth

width()[source]ΒΆ

Returns the total width of the screen

class domonic.javascript.String(x='', *args, **kwargs)[source]ΒΆ

javascript String methods

big()[source]ΒΆ

[wraps the string in big tags]

Returns

[the string in big tags]

Return type

[str]

[wraps the string in blink tags]

Returns

[the string in blink tags]

Return type

[str]

bold()[source]ΒΆ

[wraps the string in bold tags]

Returns

[the string in bold tags]

Return type

[str]

charAt(index: int) str[source]ΒΆ

[Returns the character at the specified index (position)]

Parameters

index (int) – [index position]

Returns

[the character at the specified index. if the index is out of range, an empty string is returned.]

Return type

[str]

charCodeAt(index: int) int[source]ΒΆ

Returns the Unicode of the character at the specified index

codePointAt(index: int)[source]ΒΆ

[Returns the Unicode code point at the specified index (position)]

Parameters

index (int) – [index position]

Returns

[the Unicode code point at the specified index (position)]

Return type

[type]

compile(pattern: str)[source]ΒΆ

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

concat(*args, seperator: str = '') str[source]ΒΆ

[concatenates the string arguments to the calling string and returns a new string.]

Parameters

seperator (str, optional) – []. Defaults to β€œβ€.

Returns

[A new string containing the combined text of the strings provided.]

Return type

[type]

div(*args, **kwargs)[source]ΒΆ

[wraps the string in a div tag]

Returns

[the string in a div tag]

Return type

[str]

endsWith(x: str, start: Optional[int] = None, end: Optional[int] = None) bool[source]ΒΆ

Checks whether a string ends with specified string/characters

fixed()[source]ΒΆ

[wraps the string in fixed tags]

Returns

[the string in fixed tags]

Return type

[str]

fontcolor(color: str)[source]ΒΆ

[wraps the string in font tags with a specified color]

Parameters

color (str) – [the color to use]

Returns

[the string in font tags]

Return type

[str]

fontsize(size: str)[source]ΒΆ

[wraps the string in font tags with a specified size]

Parameters

size (str) – [the size to use]

Returns

[the string in font tags]

Return type

[str]

fromCharCode(*codes) str[source]ΒΆ

returns a string created from the specified sequence of UTF-16 code units

static fromCodePoint(codePoint: int)[source]ΒΆ

Converts a Unicode code point into a string

includes(searchValue: str, position: int = 0) bool[source]ΒΆ

[returns true if the specified string is found within the calling String object,]

Parameters
  • searchValue (str) – [The string value to search for.]

  • position (int, optional) – [the position to search from]. Defaults to 0.

Returns

[a boolean value indicating whether the search value was found.]

Return type

[type]

indexOf(searchValue: str, fromIndex: int = 0)[source]ΒΆ

[returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex ]

Parameters
  • searchValue (str) – [The string value to search for.]

  • fromIndex (int) – [An integer representing the index at which to start the search]

Returns

[The index of the first occurrence of searchValue, or -1 if not found.]

Return type

[type]

italics()[source]ΒΆ

[wraps the string in italics tags]

Returns

[the string in italics tags]

Return type

[str]

lastIndexOf(searchValue: str, fromIndex: int = 0)[source]ΒΆ

returns the last index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex

[wraps the string in a link tag]

Parameters

url (str) – [the url to use]

Returns

[the string in a link tag]

Return type

[str]

localeCompare(comparisonString: str, locale: Optional[str] = None, *args) int[source]ΒΆ

method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order

match(pattern: str)[source]ΒΆ

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

matchAll(pattern: str)[source]ΒΆ

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

padEnd(length: int, padChar: str = ' ') str[source]ΒΆ

[Pads the end of a string with a specified character (repeated, if needed) to create a new string.]

Parameters
  • length (int) – [the length of the resulting string]

  • padChar (str, optional) – [the character to use for padding. Defaults to ” β€œ].

Returns

[the padded string]

Return type

[str]

padStart(length: int, padChar: str = ' ') str[source]ΒΆ

[Pads the start of a string with a specified character]

Parameters
  • length (int) – [the length of the resulting string]

  • padChar (str, optional) – [the character to use for padding. Defaults to ” β€œ].

Returns

[the padded string]

Return type

[str]

static raw(string)[source]ΒΆ

Returns the string as-is

repeat(count: int) str[source]ΒΆ

Returns a new string with a specified number of copies of an existing string

replace(old: str, new) str[source]ΒΆ

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

replaceAll(old: str, new: str)[source]ΒΆ

[returns a new string where the specified values are replaced. ES2021]

Parameters
  • old ([str]) – [word to remove]

  • new ([str]) – [word to replace it with]

Returns

[new string with all occurences of old word replaced]

Return type

[str]

search(searchValue: str, position: int = 0) bool[source]ΒΆ

[returns true if the specified string is found within the calling String object,] starting at the specified position. :param searchValue: [The string value to search for.] :type searchValue: str :param position: [the position to search from]. Defaults to 0. :type position: int, optional

Returns

[a boolean value indicating whether the search value was found.]

Return type

[type]

slice(start: int = 0, end: Optional[int] = None) str[source]ΒΆ

Selects a part of an string, and returns the new string

small()[source]ΒΆ

[wraps the string in small tags]

Returns

[the string in small tags]

Return type

[str]

split(expr) list[source]ΒΆ

[can split a string based on a regex]

Parameters

expr ([str]) – [valid regex or string to split on]

Returns

[list of str]

Return type

[list]

startsWith(x: str, start: Optional[int] = None, end: Optional[int] = None) bool[source]ΒΆ

Checks whether a string begins with specified characters

strike()[source]ΒΆ

[wraps the string in strike tags]

Returns

[the string in strike tags]

Return type

[str]

sub()[source]ΒΆ

[wraps the string in sub tags]

Returns

[the string in sub tags]

Return type

[str]

substr(start: int = 0, end: Optional[int] = None)[source]ΒΆ

Extracts the characters from a string, beginning at a specified start position, and through the specified number of character

substring(start: int, end: Optional[int] = None) str[source]ΒΆ

Extracts the characters from a string, between two specified indices

sup()[source]ΒΆ

[wraps the string in sup tags]

Returns

[the string in sup tags]

Return type

[str]

static toCharCode(char: str)[source]ΒΆ

Converts a Unicode string into a code point

static toCodePoint(char: str)[source]ΒΆ

Converts a Unicode string into a code point

toLocaleLowerCase() str[source]ΒΆ

Converts a string to lowercase letters, according to the host’s locale

toLocaleUpperCase() str[source]ΒΆ

Converts a string to uppercase letters, according to the host’s locale

toLowerCase() str[source]ΒΆ

Converts a string to lowercase letters

toUpperCase() str[source]ΒΆ

Converts a string to uppercase letters

trim()[source]ΒΆ

Removes whitespace from both ends of a string

trimEnd(length: int)[source]ΒΆ

[Removes whitespace from the end of a string]

Parameters

length (int) – [the length of the resulting string]

Returns

[the trimmed string]

Return type

[type]

trimStart(length: int)[source]ΒΆ

[Removes whitespace from the beginning of a string.]

Parameters

length (int) – [the length of the resulting string]

Returns

[the trimmed string]

Return type

[str]

webpage()[source]ΒΆ

[wraps the string in a webpage]

Returns

[the string as a webpage]

Return type

[str]

class domonic.javascript.Window(*args, **kwargs)[source]ΒΆ

window

static alert(msg)[source]ΒΆ

Displays an alert box with a message and an OK button

static atob(dataString)[source]ΒΆ

Decodes a base-64 encoded string

static btoa(dataString)[source]ΒΆ

Encodes a string in base-64

clearTimeout()ΒΆ

[cancels a timer set with setTimeout()]

Parameters

timeoutID ([str]) – [the identifier returned by setTimeout()]

static prompt(msg, default_text='')[source]ΒΆ

Displays a dialog box that prompts the visitor for input

static requestAnimationFrame(callback)[source]ΒΆ

[requests a frame of an animation]

Parameters

callback (callable) – [the callback function]

Returns

[description]

Return type

[type]

setTimeout(t, *args, **kwargs)ΒΆ

[sets a timer which executes a function or evaluates an expression after a specified delay]

Parameters
  • callback (function) – [method to be executed after the delay]

  • t ([int]) – [milliseconds]

Returns

[an identifier for the timer]

Return type

[str]

class domonic.javascript.Worker(script)[source]ΒΆ

[A background task that can be created via script, which can send messages back to its creator. Creating a worker is done by calling the Worker(β€œpath/to/worker/script”) constructor.] TODO - JSWorker - Node :param object: [takes a path to a python script] :type object: [str]

postMessage()[source]ΒΆ

Sends a message β€” consisting of any object β€” to the worker’s inner scope.

terminate()[source]ΒΆ

Immediately terminates the worker. This does not let worker finish its operations; it is halted at once. ServiceWorker instances do not support this method.

domonic.javascript.as_signed(value, bits)[source]ΒΆ

Converts an unsigned integer to a signed integer.

domonic.javascript.clearTimeout(timeoutID)ΒΆ

[cancels a timer set with setTimeout()]

Parameters

timeoutID ([str]) – [the identifier returned by setTimeout()]

domonic.javascript.decodeURI(x)ΒΆ

Decodes a URI

domonic.javascript.decodeURIComponent(x)ΒΆ

Decodes a URI component

domonic.javascript.encodeURI(x)ΒΆ

Encodes a URI

domonic.javascript.encodeURIComponent(x)ΒΆ

Encodes a URI component

domonic.javascript.function(python_str: str) str[source]ΒΆ

[evals a string i.e.

sup = function(β€˜β€™β€™print(hi)’’’) sup()

]

Parameters

python_str ([str]) – [some valid python code as a string]

domonic.javascript.parseFloat(x: str)ΒΆ

Parses a string and returns a floating point number

domonic.javascript.parseInt(x: str)ΒΆ

Parses a string and returns an integer

domonic.javascript.setTimeout(callback, t, *args, **kwargs)ΒΆ

[sets a timer which executes a function or evaluates an expression after a specified delay]

Parameters
  • callback (function) – [method to be executed after the delay]

  • t ([int]) – [milliseconds]

Returns

[an identifier for the timer]

Return type

[str]

domonic.javascript.windowΒΆ

alias of Window

domonic.terminalΒΆ

  • call command line functions in python 3

exception domonic.terminal.TerminalException(error, message='An error message was recieved from terminal')[source]ΒΆ

raised if the terminal throws an exception

class domonic.terminal.alias(*args, **kwargs)ΒΆ
class domonic.terminal.apt(*args, **kwargs)ΒΆ
class domonic.terminal.ar(*args, **kwargs)ΒΆ
class domonic.terminal.asa(*args, **kwargs)ΒΆ
class domonic.terminal.at(*args, **kwargs)ΒΆ
class domonic.terminal.awk(*args, **kwargs)ΒΆ
class domonic.terminal.banner(*args, **kwargs)ΒΆ
class domonic.terminal.basename(*args, **kwargs)ΒΆ
class domonic.terminal.bash(*args, **kwargs)ΒΆ
class domonic.terminal.batch(*args, **kwargs)ΒΆ
class domonic.terminal.bc(*args, **kwargs)ΒΆ
class domonic.terminal.bg(*args, **kwargs)ΒΆ
class domonic.terminal.bind(*args, **kwargs)ΒΆ
class domonic.terminal.builtin(*args, **kwargs)ΒΆ
class domonic.terminal.cal(*args, **kwargs)ΒΆ
class domonic.terminal.caller(*args, **kwargs)ΒΆ
class domonic.terminal.cat(*args, **kwargs)ΒΆ
class domonic.terminal.cc(*args, **kwargs)ΒΆ
class domonic.terminal.cd(*args, **kwargs)[source]ΒΆ

NOTE - β€˜cd’ does not run on terminal - cd is pointless as session opens and closes - so is overridden to change dirs via pure python

class domonic.terminal.cflow(*args, **kwargs)ΒΆ
class domonic.terminal.chgrp(*args, **kwargs)ΒΆ
class domonic.terminal.chmod(*args, **kwargs)ΒΆ
class domonic.terminal.chown(*args, **kwargs)ΒΆ
class domonic.terminal.cksum(*args, **kwargs)ΒΆ
class domonic.terminal.comm(*args, **kwargs)ΒΆ
class domonic.terminal.command(*args, **kwargs)[source]ΒΆ

wrapper class for all terminal commands

static run(cmd: str)[source]ΒΆ

runs any command on the terminal

Parameters

cmd (str) – The command you want to run on the terminal

Returns

the response as a string

Return type

str

class domonic.terminal.compgen(*args, **kwargs)ΒΆ
class domonic.terminal.complete(*args, **kwargs)ΒΆ
class domonic.terminal.compopt(*args, **kwargs)ΒΆ
class domonic.terminal.compress(*args, **kwargs)ΒΆ
class domonic.terminal.convert(*args, **kwargs)ΒΆ
class domonic.terminal.cowsay(*args, **kwargs)ΒΆ
class domonic.terminal.cp(*args, **kwargs)ΒΆ
class domonic.terminal.cron(*args, **kwargs)ΒΆ
class domonic.terminal.crontab(*args, **kwargs)ΒΆ
class domonic.terminal.csplit(*args, **kwargs)ΒΆ
class domonic.terminal.ctags(*args, **kwargs)ΒΆ
class domonic.terminal.curl(*args, **kwargs)ΒΆ
class domonic.terminal.cut(*args, **kwargs)ΒΆ
class domonic.terminal.cxref(*args, **kwargs)ΒΆ
class domonic.terminal.date(*args, **kwargs)ΒΆ
class domonic.terminal.dd(*args, **kwargs)ΒΆ
class domonic.terminal.declare(*args, **kwargs)ΒΆ
class domonic.terminal.delta(*args, **kwargs)ΒΆ
class domonic.terminal.df(*args, **kwargs)ΒΆ
class domonic.terminal.diff(*args, **kwargs)ΒΆ
class domonic.terminal.dirname(*args, **kwargs)ΒΆ
class domonic.terminal.dirs(*args, **kwargs)ΒΆ
class domonic.terminal.disown(*args, **kwargs)ΒΆ
class domonic.terminal.du(*args, **kwargs)ΒΆ
class domonic.terminal.echo(*args, **kwargs)ΒΆ
class domonic.terminal.ed(*args, **kwargs)ΒΆ
class domonic.terminal.enable(*args, **kwargs)ΒΆ
class domonic.terminal.env(*args, **kwargs)ΒΆ
class domonic.terminal.ex(*args, **kwargs)ΒΆ
class domonic.terminal.exit(*args, **kwargs)ΒΆ
class domonic.terminal.expand(*args, **kwargs)ΒΆ
class domonic.terminal.export(*args, **kwargs)ΒΆ
class domonic.terminal.expr(*args, **kwargs)ΒΆ
class domonic.terminal.fc(*args, **kwargs)ΒΆ
class domonic.terminal.ffmpeg(*args, **kwargs)ΒΆ
class domonic.terminal.fg(*args, **kwargs)ΒΆ
class domonic.terminal.figlet(*args, **kwargs)ΒΆ
class domonic.terminal.file(*args, **kwargs)ΒΆ
class domonic.terminal.find(*args, **kwargs)ΒΆ
class domonic.terminal.finger(*args, **kwargs)ΒΆ
class domonic.terminal.fold(*args, **kwargs)ΒΆ
class domonic.terminal.fort77(*args, **kwargs)ΒΆ
class domonic.terminal.fuser(*args, **kwargs)ΒΆ
class domonic.terminal.gcc(*args, **kwargs)ΒΆ
class domonic.terminal.gencat(*args, **kwargs)ΒΆ
class domonic.terminal.get(*args, **kwargs)ΒΆ
class domonic.terminal.getconf(*args, **kwargs)ΒΆ
class domonic.terminal.getopts(*args, **kwargs)ΒΆ
class domonic.terminal.git(*args, **kwargs)ΒΆ
class domonic.terminal.grep(*args, **kwargs)ΒΆ
class domonic.terminal.groupadd(*args, **kwargs)ΒΆ
class domonic.terminal.groupdel(*args, **kwargs)ΒΆ
class domonic.terminal.groups(*args, **kwargs)ΒΆ
class domonic.terminal.gunzip(*args, **kwargs)ΒΆ
class domonic.terminal.gzip(*args, **kwargs)ΒΆ
class domonic.terminal.head(*args, **kwargs)ΒΆ
class domonic.terminal.history(*args, **kwargs)[source]ΒΆ
class domonic.terminal.iconv(*args, **kwargs)ΒΆ
class domonic.terminal.ifconfig(*args, **kwargs)ΒΆ
class domonic.terminal.ipconfig(*args, **kwargs)ΒΆ
class domonic.terminal.ipcrm(*args, **kwargs)ΒΆ
class domonic.terminal.ipcs(*args, **kwargs)ΒΆ
class domonic.terminal.jobs(*args, **kwargs)ΒΆ
class domonic.terminal.join(*args, **kwargs)ΒΆ
class domonic.terminal.jq(*args, **kwargs)ΒΆ
class domonic.terminal.kill(*args, **kwargs)ΒΆ
class domonic.terminal.killall(*args, **kwargs)ΒΆ
class domonic.terminal.less(*args, **kwargs)ΒΆ
class domonic.terminal.let(*args, **kwargs)ΒΆ
class domonic.terminal.lex(*args, **kwargs)ΒΆ
class domonic.terminal.ln(*args, **kwargs)ΒΆ
class domonic.terminal.local(*args, **kwargs)ΒΆ
class domonic.terminal.locale(*args, **kwargs)ΒΆ
class domonic.terminal.localedef(*args, **kwargs)ΒΆ
class domonic.terminal.logger(*args, **kwargs)ΒΆ
class domonic.terminal.logname(*args, **kwargs)ΒΆ
class domonic.terminal.logout(*args, **kwargs)ΒΆ
class domonic.terminal.lp(*args, **kwargs)ΒΆ
class domonic.terminal.ls(*args, **kwargs)ΒΆ
class domonic.terminal.m4(*args, **kwargs)ΒΆ
class domonic.terminal.mailx(*args, **kwargs)ΒΆ
class domonic.terminal.make(*args, **kwargs)ΒΆ
class domonic.terminal.man(*args, **kwargs)ΒΆ
class domonic.terminal.mapfile(*args, **kwargs)ΒΆ
class domonic.terminal.mesg(*args, **kwargs)ΒΆ
class domonic.terminal.mkdir(*args, **kwargs)ΒΆ
class domonic.terminal.mkfifo(*args, **kwargs)ΒΆ
class domonic.terminal.mkfile(*args, **kwargs)ΒΆ
class domonic.terminal.more(*args, **kwargs)ΒΆ
class domonic.terminal.mv(*args, **kwargs)ΒΆ
class domonic.terminal.nautilus(*args, **kwargs)ΒΆ
class domonic.terminal.newgrp(*args, **kwargs)ΒΆ
class domonic.terminal.nice(*args, **kwargs)ΒΆ
class domonic.terminal.nl(*args, **kwargs)ΒΆ
class domonic.terminal.nm(*args, **kwargs)ΒΆ
class domonic.terminal.nmap(*args, **kwargs)ΒΆ
class domonic.terminal.nohup(*args, **kwargs)ΒΆ
class domonic.terminal.npm(*args, **kwargs)ΒΆ
class domonic.terminal.od(*args, **kwargs)ΒΆ
class domonic.terminal.passwd(*args, **kwargs)ΒΆ
class domonic.terminal.paste(*args, **kwargs)ΒΆ
class domonic.terminal.patch(*args, **kwargs)ΒΆ
class domonic.terminal.pathchk(*args, **kwargs)ΒΆ
class domonic.terminal.pax(*args, **kwargs)ΒΆ
class domonic.terminal.ping(*args, **kwargs)ΒΆ
class domonic.terminal.pip(*args, **kwargs)ΒΆ
class domonic.terminal.popd(*args, **kwargs)ΒΆ
class domonic.terminal.pr(*args, **kwargs)ΒΆ
class domonic.terminal.printf(*args, **kwargs)ΒΆ
class domonic.terminal.prs(*args, **kwargs)ΒΆ
class domonic.terminal.ps(*args, **kwargs)ΒΆ
class domonic.terminal.pushd(*args, **kwargs)ΒΆ
class domonic.terminal.pwd(*args, **kwargs)ΒΆ
class domonic.terminal.python(*args, **kwargs)ΒΆ
class domonic.terminal.qalter(*args, **kwargs)ΒΆ
class domonic.terminal.qdel(*args, **kwargs)ΒΆ
class domonic.terminal.qhold(*args, **kwargs)ΒΆ
class domonic.terminal.qmove(*args, **kwargs)ΒΆ
class domonic.terminal.qmsg(*args, **kwargs)ΒΆ
class domonic.terminal.qrerun(*args, **kwargs)ΒΆ
class domonic.terminal.qrls(*args, **kwargs)ΒΆ
class domonic.terminal.qselect(*args, **kwargs)ΒΆ
class domonic.terminal.qsig(*args, **kwargs)ΒΆ
class domonic.terminal.qstat(*args, **kwargs)ΒΆ
class domonic.terminal.qsub(*args, **kwargs)ΒΆ
class domonic.terminal.read(*args, **kwargs)ΒΆ
class domonic.terminal.readarray(*args, **kwargs)ΒΆ
class domonic.terminal.readonly(*args, **kwargs)ΒΆ
class domonic.terminal.reboot(*args, **kwargs)ΒΆ
class domonic.terminal.renice(*args, **kwargs)ΒΆ
class domonic.terminal.rm(*args, **kwargs)ΒΆ
class domonic.terminal.rmdel(*args, **kwargs)ΒΆ
class domonic.terminal.rmdir(*args, **kwargs)ΒΆ
class domonic.terminal.rsync(*args, **kwargs)ΒΆ
class domonic.terminal.sact(*args, **kwargs)ΒΆ
class domonic.terminal.say(*args, **kwargs)ΒΆ
class domonic.terminal.sccs(*args, **kwargs)ΒΆ
class domonic.terminal.scp(*args, **kwargs)ΒΆ
class domonic.terminal.sed(*args, **kwargs)ΒΆ
class domonic.terminal.sh(*args, **kwargs)ΒΆ
class domonic.terminal.shift(*args, **kwargs)ΒΆ
class domonic.terminal.shopt(*args, **kwargs)ΒΆ
class domonic.terminal.shutdown(*args, **kwargs)ΒΆ
class domonic.terminal.sleep(*args, **kwargs)ΒΆ
class domonic.terminal.sort(*args, **kwargs)ΒΆ
class domonic.terminal.source(*args, **kwargs)ΒΆ
class domonic.terminal.split(*args, **kwargs)ΒΆ
class domonic.terminal.ssh(*args, **kwargs)ΒΆ
class domonic.terminal.strings(*args, **kwargs)ΒΆ
class domonic.terminal.strip(*args, **kwargs)ΒΆ
class domonic.terminal.stty(*args, **kwargs)ΒΆ
class domonic.terminal.suspend(*args, **kwargs)ΒΆ
class domonic.terminal.tabs(*args, **kwargs)ΒΆ
class domonic.terminal.tail(*args, **kwargs)ΒΆ
class domonic.terminal.talk(*args, **kwargs)ΒΆ
class domonic.terminal.tar(*args, **kwargs)ΒΆ
class domonic.terminal.tee(*args, **kwargs)ΒΆ
class domonic.terminal.test(*args, **kwargs)ΒΆ
class domonic.terminal.time(*args, **kwargs)ΒΆ
class domonic.terminal.times(*args, **kwargs)ΒΆ
class domonic.terminal.touch(*args, **kwargs)ΒΆ
class domonic.terminal.tput(*args, **kwargs)ΒΆ
class domonic.terminal.tr(*args, **kwargs)ΒΆ
class domonic.terminal.trap(*args, **kwargs)ΒΆ
class domonic.terminal.true(*args, **kwargs)ΒΆ
class domonic.terminal.tsort(*args, **kwargs)ΒΆ
class domonic.terminal.tty(*args, **kwargs)ΒΆ
class domonic.terminal.typeset(*args, **kwargs)ΒΆ
class domonic.terminal.ulimit(*args, **kwargs)ΒΆ
class domonic.terminal.umask(*args, **kwargs)ΒΆ
class domonic.terminal.unalias(*args, **kwargs)ΒΆ
class domonic.terminal.uname(*args, **kwargs)ΒΆ
class domonic.terminal.uncompress(*args, **kwargs)ΒΆ
class domonic.terminal.unexpand(*args, **kwargs)ΒΆ
class domonic.terminal.unget(*args, **kwargs)ΒΆ
class domonic.terminal.uniq(*args, **kwargs)ΒΆ
class domonic.terminal.unset(*args, **kwargs)ΒΆ
class domonic.terminal.uptime(*args, **kwargs)ΒΆ
class domonic.terminal.useradd(*args, **kwargs)ΒΆ
class domonic.terminal.userdel(*args, **kwargs)ΒΆ
class domonic.terminal.users(*args, **kwargs)ΒΆ
class domonic.terminal.uucp(*args, **kwargs)ΒΆ
class domonic.terminal.uudecode(*args, **kwargs)ΒΆ
class domonic.terminal.uuencode(*args, **kwargs)ΒΆ
class domonic.terminal.uustat(*args, **kwargs)ΒΆ
class domonic.terminal.uux(*args, **kwargs)ΒΆ
class domonic.terminal.val(*args, **kwargs)ΒΆ
class domonic.terminal.wait(*args, **kwargs)ΒΆ
class domonic.terminal.wc(*args, **kwargs)ΒΆ
class domonic.terminal.wget(*args, **kwargs)ΒΆ
class domonic.terminal.what(*args, **kwargs)ΒΆ
class domonic.terminal.who(*args, **kwargs)ΒΆ
class domonic.terminal.whoami(*args, **kwargs)ΒΆ
class domonic.terminal.write(*args, **kwargs)ΒΆ
class domonic.terminal.xargs(*args, **kwargs)ΒΆ
class domonic.terminal.yacc(*args, **kwargs)ΒΆ
class domonic.terminal.zcat(*args, **kwargs)ΒΆ

domonic.JSONΒΆ

domonic.JSON.csv2json(csv_filepath, json_filepath=None)[source]ΒΆ

convert a CSV to JSON.

domonic.JSON.csvify(arr, outfile='data.csv')[source]ΒΆ

takes a json array and dumps a csv file

Parameters
  • arr (list) – the json array

  • outfile (list) – the output file

Returns

a csv file

Return type

str

domonic.JSON.flatten(b, delim='__')[source]ΒΆ

# i.e. input = map( lambda x: JSON.flatten( x, β€œ__” ), input )

domonic.JSON.parse(json_string: str)[source]ΒΆ

[take a json string and return a python object]

Parameters

json_string (str) – [a json string]

Returns

[a python object]

Return type

[type]

domonic.JSON.parse_file(filepath: str)[source]ΒΆ

[loads a json file and returns a python object]

Parameters

filepath (str) – [path to json file]

Returns

[a python object]

Return type

[type]

domonic.JSON.stringify(data, filepath: Optional[str] = None, **kwargs)[source]ΒΆ

[stringify a python object]

Parameters
  • data ([type]) – [the python object]

  • filepath (str, optional) – [an optional filepath to save the stringified object] [default: None]

Returns

[the stringified object]

Return type

[type]

domonic.JSON.tablify(arr)[source]ΒΆ

takes a json array and returns a html table # TODO - reverse. table to json

Parameters

arr (list) – the json array

Returns

a html table

Return type

str

domonic.CDNΒΆ

For quick reference when prototyping you can use the CDN package. (Don’t rely on a CDN package for production code. wget a local copy.)

TODO - integrity/cross origin/module?

class domonic.CDN.CDN_CSS[source]ΒΆ

Preferably use version numbers if available. use LATEST if it always gets the latest

BALLOON: str = 'https://unpkg.com/balloon-css/balloon.min.css'ΒΆ
BOOTSTRAP_4: str = 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css'ΒΆ
BOOTSTRAP_5_ALPHA: str = 'https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js'ΒΆ
FONTAWESOME_5_7_1: str = 'https://use.fontawesome.com/releases/v5.7.1/css/all.css'ΒΆ
MARX: str = 'https://unpkg.com/marx-css/css/marx.min.css'ΒΆ
MDI_5_4_55: str = 'https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css'ΒΆ
MILLIGRAM_1_3_0: str = 'https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.css'ΒΆ
MVP: str = 'https://unpkg.com/mvp.css'ΒΆ
SIMPLE: str = 'https://cdn.simplecss.org/simple.min.css'ΒΆ
TAILWIND_2_2_15: str = 'https://unpkg.com/tailwindcss@^2.2.15/dist/tailwind.min.css'ΒΆ
THREE_DOTS_0_2_0: str = 'https://cdnjs.cloudflare.com/ajax/libs/three-dots/0.2.0/three-dots.min.css'ΒΆ
WATER_LATEST: str = 'https://cdn.jsdelivr.net/gh/kognise/water.css@latest/water.min.css'ΒΆ
X3DOM: str = 'https://www.x3dom.org/download/x3dom.css'ΒΆ
class domonic.CDN.CDN_IMG[source]ΒΆ

CDN images

static PLACEHOLDER(width: int = 100, height: int = 100, HTTP: str = '', seperator: str = '/') str[source]ΒΆ

to update do CDN_IMG.PLACEHOLDER_SERVICE = β€œplacebear.com/g” usage : img(_src=CDN_IMG.PLACEHOLDER(300,100)) default HTTP is none, to let the browser decide # use optional seperator if the site uses x instead of slash img(_src=CDN_IMG.PLACEHOLDER(300,100,’x’))

class domonic.CDN.CDN_JS[source]ΒΆ

js libs

AFRAME_1_2: str = 'https://aframe.io/releases/1.2.0/aframe.min.js'ΒΆ
BOOTSTRAP_4: str = 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js'ΒΆ
BOOTSTRAP_5 = 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js'ΒΆ

latest

BOOTSTRAP_5_ALPHA: str = 'https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js'ΒΆ
BRYTHON_3_9_5: str = 'https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.5/brython.min.js'ΒΆ
D3: str = 'https://cdnjs.cloudflare.com/ajax/libs/d3/7.4.3/d3.min.js'ΒΆ

latest

D3_6_1_0: str = 'https://cdnjs.cloudflare.com/ajax/libs/d3/6.1.0/d3.min.js'ΒΆ
HTMX: str = 'https://unpkg.com/htmx.org@1.7.0'ΒΆ

latest

JQUERY: str = 'https://code.jquery.com/jquery-3.6.0.min.js'ΒΆ

latest

JQUERY_3_5_1: str = 'https://code.jquery.com/jquery-3.5.1.min.js'ΒΆ
JQUERY_UI: str = 'https://code.jquery.com/ui/1.12.0/jquery-ui.min.js'ΒΆ
MATHML: str = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=MML_HTMLorMML'ΒΆ
MODERNIZER_2_8_3: str = 'https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js'ΒΆ
MOMENT_2_27_0: str = 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js'ΒΆ
PIXI_5_3_3: str = 'https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.3.3/pixi.min.js'ΒΆ
POPPER_1_16_1: str = 'https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js'ΒΆ
SOCKET_1_4_5: str = 'https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js'ΒΆ
UNDERSCORE: str = 'https://cdn.jsdelivr.net/npm/underscore@1.11.0/underscore-min.js'ΒΆ
X3DOM: str = 'https://www.x3dom.org/download/x3dom.js'ΒΆ

domonic.eventsΒΆ

https://developer.mozilla.org/en-US/docs/Web/Events

class domonic.events.AnimationEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
ANIMATIONEND: str = 'animationend'ΒΆ
ANIMATIONITERATION: str = 'animationiteration'ΒΆ
ANIMATIONSTART: str = 'animationstart'ΒΆ
animationNameΒΆ

Returns the name of the animation

elapsedTimeΒΆ

Returns the number of seconds an animation has been running

pseudoElementΒΆ

Returns the name of the pseudo-element of the animation

class domonic.events.BeforeUnloadEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
BEFOREUNLOAD: str = 'beforeunload'ΒΆ

BeforeUnloadEvent

class domonic.events.ClipboardEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
COPY: str = 'copy'ΒΆ
CUT: str = 'cut'ΒΆ
PASTE: str = 'paste'ΒΆ
clipboardDataΒΆ

Returns an object containing the data affected by the clipboard operation

class domonic.events.CompositionEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
class domonic.events.CustomEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
class domonic.events.DOMContentLoadedEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
DOMCONTENTLOADED: str = 'DOMContentLoaded'ΒΆ
documentΒΆ

Returns the document that was loaded

class domonic.events.DragEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
DRAG: str = 'drag'ΒΆ
DROP: str = 'drop'ΒΆ
END: str = 'dragend'ΒΆ
ENTER: str = 'dragenter'ΒΆ
EXIT: str = 'dragexit'ΒΆ
LEAVE: str = 'dragleave'ΒΆ
OVER: str = 'dragover'ΒΆ
START: str = 'dragstart'ΒΆ
dataTransferΒΆ

Returns the data that is dragged/dropped

class domonic.events.ErrorEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
ERROR: str = 'error'ΒΆ
class domonic.events.Event(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ

event

ABORT: str = 'abort'ΒΆ
AFTERPRINT: str = 'afterprint'ΒΆ
BEFOREPRINT: str = 'beforeprint'ΒΆ
BEFOREUNLOAD: str = 'beforeunload'ΒΆ
CANPLAY: str = 'canplay'ΒΆ
CANPLAYTHROUGH: str = 'canplaythrough'ΒΆ
CHANGE: str = 'change'ΒΆ
DURATIONCHANGE: str = 'durationchange'ΒΆ
EMPTIED: str = 'emptied'ΒΆ
ENDED: str = 'ended'ΒΆ
ERROR: str = 'error'ΒΆ
FULLSCREENCHANGE: str = 'fullscreenchange'ΒΆ
FULLSCREENERROR: str = 'fullscreenerror'ΒΆ
INPUT: str = 'input'ΒΆ
INVALID: str = 'invalid'ΒΆ
LOAD: str = 'load'ΒΆ
LOADEDDATA: str = 'loadeddata'ΒΆ
LOADEDMETADATA: str = 'loadedmetadata'ΒΆ
MESSAGE: str = 'message'ΒΆ
OFFLINE: str = 'offline'ΒΆ
ONLINE: str = 'online'ΒΆ
OPEN: str = 'open'ΒΆ
PAUSE: str = 'pause'ΒΆ
PLAY: str = 'play'ΒΆ
PLAYING: str = 'playing'ΒΆ
PROGRESS: str = 'progress'ΒΆ
RATECHANGE: str = 'ratechange'ΒΆ
READYSTATECHANGE: str = 'readystatechange'ΒΆ
RESET: str = 'reset'ΒΆ
RESIZE: str = 'resize'ΒΆ
SCROLL: str = 'scroll'ΒΆ
SEARCH: str = 'search'ΒΆ
SEEKED: str = 'seeked'ΒΆ
SEEKING: str = 'seeking'ΒΆ
SELECT: str = 'select'ΒΆ
SHOW: str = 'show'ΒΆ
STALLED: str = 'stalled'ΒΆ
SUBMIT: str = 'submit'ΒΆ
SUSPEND: str = 'suspend'ΒΆ
TOGGLE: str = 'toggle'ΒΆ
UNLOAD: str = 'unload'ΒΆ
VOLUMECHANGE: str = 'volumechange'ΒΆ
WAITING: str = 'waiting'ΒΆ
stopPropagation()[source]ΒΆ

[prevents further propagation of the current event in the capturing and bubbling phases]

domonic.events.EventDispatcherΒΆ

legacy alias

class domonic.events.EventTarget(*args, **kwargs)[source]ΒΆ

EventTarget is a class you can extend to give your obj event dispatching abilities

class domonic.events.ExtendableEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
extendableΒΆ

Returns whether the event is extendable or not

timeStamp: floatΒΆ

Returns the time stamp of the event

class domonic.events.FetchEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
FETCH: str = 'fetch'ΒΆ
clientIdΒΆ

Returns the client ID of the fetch request

property isReloadΒΆ

Returns whether the request is a reload or not

requestΒΆ

Returns the request object

respondWith(response)[source]ΒΆ

Returns a promise that resolves to the response object

waitUntil(promise)[source]ΒΆ

Returns a promise that resolves when the response is available

class domonic.events.FocusEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
BLUR: str = 'blur'ΒΆ
FOCUS: str = 'focus'ΒΆ
FOCUSIN: str = 'focusin'ΒΆ
FOCUSOUT: str = 'focusout'ΒΆ
class domonic.events.GamePadEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
START: str = 'gamepadconnected'ΒΆ
STOP: str = 'gamepaddisconnected'ΒΆ
class domonic.events.HashChangeEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
CHANGE: str = 'hashchange'ΒΆ
class domonic.events.InputEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
CHANGE: str = 'change'ΒΆ
INPUT: str = 'input'ΒΆ
SELECT: str = 'select'ΒΆ
dataΒΆ

Returns the inserted characters

dataTransferΒΆ

Returns an object containing information about the inserted/deleted data

getTargetRanges()[source]ΒΆ

Returns an array containing target ranges that will be affected by the insertion/deletion

inputTypeΒΆ

Returns the type of the change (i.e β€œinserting” or β€œdeleting”)

isComposingΒΆ

Returns whether the state of the event is composing or not

class domonic.events.KeyboardEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ

keyboard events

DOM_KEY_LOCATION_JOYSTICK: int = 5ΒΆ
DOM_KEY_LOCATION_LEFT: int = 0ΒΆ
DOM_KEY_LOCATION_MOBILE: int = 4ΒΆ
DOM_KEY_LOCATION_NUMPAD: int = 3ΒΆ
DOM_KEY_LOCATION_RIGHT: int = 2ΒΆ
DOM_KEY_LOCATION_STANDARD: int = 1ΒΆ
KEYDOWN: str = 'keydown'ΒΆ
KEYPRESS: str = 'keypress'ΒΆ
KEYUP: str = 'keyup'ΒΆ
class domonic.events.MessageEvent(_type, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
CONNECT: str = 'connect'ΒΆ
DISCONNECT: str = 'disconnect'ΒΆ
MESSAGE: str = 'message'ΒΆ
dataΒΆ

Returns the data of the message

lastEventIdΒΆ

Returns the last event id of the message

originΒΆ

Returns the origin of the message

portsΒΆ

Returns the ports of the message

sourceΒΆ

Returns the source of the message

class domonic.events.MouseEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ

mouse events

CLICK: str = 'click'ΒΆ
CONTEXTMENU: str = 'contextmenu'ΒΆ
DBLCLICK: str = 'dblclick'ΒΆ
MOUSEDOWN: str = 'mousedown'ΒΆ
MOUSEENTER: str = 'mouseenter'ΒΆ
MOUSELEAVE: str = 'mouseleave'ΒΆ
MOUSEMOVE: str = 'mousemove'ΒΆ
MOUSEOUT: str = 'mouseout'ΒΆ
MOUSEOVER: str = 'mouseover'ΒΆ
MOUSEUP: str = 'mouseup'ΒΆ
getModifierState()[source]ΒΆ

Returns an array containing target ranges that will be affected by the insertion/deletion

class domonic.events.PageTransitionEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
PAGEHIDE: str = 'pagehide'ΒΆ
PAGESHOW: str = 'pageshow'ΒΆ
persistedΒΆ

Returns whether the webpage was cached by the browser

class domonic.events.PointerEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
POINTER: str = 'pointer'ΒΆ
POINTERCANCEL: str = 'pointercancel'ΒΆ
POINTERDOWN: str = 'pointerdown'ΒΆ
POINTERENTER: str = 'pointerenter'ΒΆ
POINTERLEAVE: str = 'pointerleave'ΒΆ
POINTERMOVE: str = 'pointermove'ΒΆ
POINTEROUT: str = 'pointerout'ΒΆ
POINTEROVER: str = 'pointerover'ΒΆ
POINTERUP: str = 'pointerup'ΒΆ
class domonic.events.PopStateEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
POPSTATE: str = 'popstate'ΒΆ
stateΒΆ

Returns an object containing a copy of the history entries

class domonic.events.ProgressEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
ABORT: str = 'abort'ΒΆ
ERROR: str = 'error'ΒΆ
LOAD: str = 'load'ΒΆ
LOADED: str = 'loaded'ΒΆ
LOADEND: str = 'loadend'ΒΆ
LOADSTART: str = 'loadstart'ΒΆ
PROGRESS: str = 'progress'ΒΆ
TIMEOUT: str = 'timeout'ΒΆ
class domonic.events.PromiseRejectionEvent(_type, options=None, *args, **kwargs)[source]ΒΆ
HANDLED: str = 'rejectionhandled'ΒΆ
UNHANDLED: str = 'unhandledrejection'ΒΆ
isRejectedΒΆ

Returns whether the promise was rejected or not

promiseΒΆ

Returns the promise that was rejected

reasonΒΆ

Returns the reason of the rejection

class domonic.events.SVGEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
ABORT: str = 'abort'ΒΆ
ERROR: str = 'error'ΒΆ
LOAD: str = 'load'ΒΆ
LOADEDDATA: str = 'loadeddata'ΒΆ
LOADEDMETADATA: str = 'loadedmetadata'ΒΆ
LOADSTART: str = 'loadstart'ΒΆ
PROGRESS: str = 'progress'ΒΆ
SCROLL: str = 'scroll'ΒΆ
UNLOAD: str = 'unload'ΒΆ
class domonic.events.SecurityPolicyViolationEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
SECURITY_POLICY_VIOLATION: str = 'securitypolicyviolation'ΒΆ
blockedURIΒΆ

Returns the blocked URI

frameΒΆ

Returns the frame that violated the policy

isFrameAncestorΒΆ

Returns whether the frame is an ancestor of the frame that violated the policy

isMainFrameΒΆ

Returns whether the frame is the main frame

originalPolicyΒΆ

Returns the original policy

violatedDirectiveΒΆ

Returns the violated directive

class domonic.events.StorageEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
STORAGE: str = 'storage'ΒΆ
keyΒΆ

Returns the key of the changed storage item

newValueΒΆ

Returns the new value of the changed storage item

oldValueΒΆ

Returns the old value of the changed storage item

storageAreaΒΆ

Returns an object representing the affected storage object

urlΒΆ

Returns the URL of the changed item’s document

class domonic.events.SubmitEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
SUBMIT: str = 'submit'ΒΆ
class domonic.events.SyncEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
SYNC: str = 'sync'ΒΆ
lastChanceΒΆ

Returns whether the sync event is the last chance or not

tagΒΆ

Returns the tag of the sync event

class domonic.events.TimerEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
TIMER: str = 'timer'ΒΆ
TIMER_COMPLETE: str = 'timercomplete'ΒΆ

TimerEvent

class domonic.events.TouchEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
TOUCHCANCEL: str = 'touchcancel'ΒΆ
TOUCHEND: str = 'touchend'ΒΆ
TOUCHMOVE: str = 'touchmove'ΒΆ
TOUCHSTART: str = 'touchstart'ΒΆ
class domonic.events.TransitionEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
TRANSITIONEND: str = 'transitionend'ΒΆ
elapsedTimeΒΆ

Returns the number of seconds a transition has been running

propertyNameΒΆ

Returns the name of the transition

pseudoElementΒΆ

Returns the name of the pseudo-element of the transition

class domonic.events.TweenEvent(_type, source=None, bubbles=False, cancelable=False)[source]ΒΆ
COMPLETE: str = 'onComplete'ΒΆ
PAUSE: str = 'onPause'ΒΆ
RESET: str = 'onReset'ΒΆ
START: str = 'onStart'ΒΆ
STOP: str = 'onStop'ΒΆ
TIMER: str = 'onTimer'ΒΆ
UNPAUSE: str = 'onUnPause'ΒΆ
UPDATE_END: str = 'onUpdateEnd'ΒΆ
UPDATE_START: str = 'onUpdateStart'ΒΆ
class domonic.events.UIEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
class domonic.events.WheelEvent(_type: str, options: Optional[dict] = None, *args, **kwargs)[source]ΒΆ
WHEEL: str = 'wheel'ΒΆ

domonic.styleΒΆ

# TODO - should this be moved to the webapi in a future revision?

class domonic.style.CSSColorProfileRule[source]ΒΆ

The CSSColorProfileRule interface represents an @color-profile rule.

class domonic.style.CSSConditionRule[source]ΒΆ

The CSSConditionRule interface represents a condition rule.

class domonic.style.CSSCounterStyleRule[source]ΒΆ

The CSSCounterStyleRule interface represents a @counter-style rule.

class domonic.style.CSSDocumentRule[source]ΒΆ

The CSSDocumentRule interface represents an @document rule.

class domonic.style.CSSFontFaceRule[source]ΒΆ

The CSSFontFaceRule interface represents a @font-face rule in a CSS style sheet.

class domonic.style.CSSFontFeatureValuesRule[source]ΒΆ

The CSSFontFeatureValuesRule interface represents a @font-feature-values rule.

class domonic.style.CSSGroupingRule[source]ΒΆ

The CSSGroupingRule interface represents a @grouping rule.

class domonic.style.CSSImportRule[source]ΒΆ

The CSSImportRule interface represents an @import rule in a CSS style sheet.

class domonic.style.CSSKeyframeRule[source]ΒΆ

The CSSKeyframeRule interface represents a single @keyframes at-rule.

class domonic.style.CSSKeyframesRule[source]ΒΆ

The CSSKeyframesRule interface represents a @keyframes at-rule.

class domonic.style.CSSMediaRule[source]ΒΆ

The CSSMediaRule interface represents a @media rule in a CSS style sheet.

class domonic.style.CSSNamespaceRule[source]ΒΆ

The CSSNamespaceRule interface represents an @namespace rule in a CSS style sheet.

class domonic.style.CSSPageRule[source]ΒΆ

The CSSPageRule interface represents a @page rule in a CSS style sheet.

class domonic.style.CSSRule[source]ΒΆ

The CSSRule interface represents a single CSS rule. There are several types of rules which inherit properties from CSSRule.

CSSFontFeatureValuesRule CSSViewportRule

property cssTextΒΆ

16pt }” or β€œ@import β€˜url’”. To access or modify parts of the rule (e.g. the value of β€œfont-size” in the example) use the properties on the specialized interface for the rule’s type.

Type

Represents the textual representation of the rule, e.g. β€œh1,h2 { font-size

class domonic.style.CSSRuleList(iterable=(), /)[source]ΒΆ

A CSSRuleList represents an ordered collection of read-only CSSRule objects. While the CSSRuleList object is read-only, and cannot be directly modified, it is considered a live object, as the content can change over time.

item(index: int) CSSRule[source]ΒΆ

Gets a single CSSRule.

property length: intΒΆ

Returns an integer representing the number of CSSRule objects in the collection.

class domonic.style.CSSStyleDeclaration(parentNode=None, *args, **kwargs)[source]ΒΆ

The CSSStyleDeclaration interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.

A CSSStyleDeclaration object can be exposed using three different APIs:

Via HTMLElement.style, which deals with the inline styles of a single element (e.g., <div style=”…”>). Via the CSSStyleSheet API. For example, document.styleSheets[0].cssRules[0].style returns a CSSStyleDeclaration object on the first CSS rule in the document’s first stylesheet. Via Window.getComputedStyle(), which exposes the CSSStyleDeclaration object as a read-only interface.

getPropertyCSSValue()[source]ΒΆ

Only supported via getComputedStyle in Firefox. Returns the property value as a CSSPrimitiveValue or null for shorthand properties.

getPropertyPriority()[source]ΒΆ

Returns the optional priority, β€œimportant”.

getPropertyValue(propertyName: str) str[source]ΒΆ

Returns the value of the property with the specified name.

item(index: int) str[source]ΒΆ

Returns a CSS property name by its index, or the empty string if the index is out-of-bounds. An alternative to accessing nodeList[i] (which instead returns undefined when i is out-of-bounds). This is mostly useful for non-JavaScript DOM implementations.

property lengthΒΆ

The number of properties. See the item() method below.

removeProperty()[source]ΒΆ

Removes a property from the CSS declaration block.

class domonic.style.CSSStyleRule[source]ΒΆ

The CSSStyleRule interface represents a single style rule in a CSS style sheet.

property cssTextΒΆ

Returns the textual representation of the rule.

class domonic.style.CSSStyleSheet[source]ΒΆ

Creates a new CSSStyleSheet object.

addRule(selectorText: str, style: str, index: int)[source]ΒΆ

Adds a new rule to the stylesheet given the selector to which the style applies and the style block to apply to the matching elements. This differs from insertRule(), which takes the textual representation of the entire rule as a single string.

deleteRule(index: int)[source]ΒΆ

Deletes the rule at the specified index into the stylesheet’s rule list.

insertRule(rule: str, index: Optional[int] = None)[source]ΒΆ

Inserts a new rule at the specified position in the stylesheet, given the textual representation of the rule.

removeRule(index: int)[source]ΒΆ

Functionally identical to deleteRule(); removes the rule at the specified index from the stylesheet’s rule list.

replace(text: str)[source]ΒΆ

Asynchronously replaces the content of the stylesheet and returns a Promise that resolves with the updated CSSStyleSheet.

replaceSync(text: str)[source]ΒΆ

Synchronously replaces the content of the stylesheet.

class domonic.style.CSSSupportsRule[source]ΒΆ

The CSSSupportsRule interface represents a @supports at-rule.

class domonic.style.MediaList(iterable=(), /)[source]ΒΆ

The MediaList interface represents a list of media. It is used in the @media at-rule.

appendMedium(newMedium: str) None[source]ΒΆ

Appends a new medium to the end of the list.

deleteMedium(oldMedium: str) None[source]ΒΆ

Removes medium in the media list. If the medium is not found nothing happens.

item(index: int) str[source]ΒΆ

Returns the media at the given index in the MediaList.

property length: intΒΆ

Returns the number of media in the list.

property mediaText: strΒΆ

Returns a string containing the text of the media query.

class domonic.style.Style(parent_node=None)[source]ΒΆ

[ js syntax styles ] #Β TODO - just add normal float? # TODO - consider camel case for hyphen params? # TODO - not json serialisable due to the decorators.

property alignContentΒΆ

Sets or returns the alignment between the lines inside a flexible container when the items do not use all available space

property alignItemsΒΆ

Sets or returns the alignment for items inside a flexible container

property alignSelfΒΆ

Sets or returns the alignment for selected items inside a flexible container

property animationΒΆ

shorthand property for all the animation properties below, except the animationPlayState property

property animationDelayΒΆ

Sets or returns when the animation will start

property animationDirectionΒΆ

Sets or returns whether or not the animation should play in reverse on alternate cycles

property animationDurationΒΆ

Sets or returns how many seconds or milliseconds an animation takes to complete one cycle

property animationFillModeΒΆ

Sets or returns what values are applied by the animation outside the time it is executing

property animationIterationCountΒΆ

Sets or returns the number of times an animation should be played

property animationNameΒΆ

Sets or returns a name for the @keyframes animation

property animationPlayStateΒΆ

Sets or returns whether the animation is running or paused

property animationTimingFunctionΒΆ

Sets or returns the speed curve of the animation

property backfaceVisibilityΒΆ

Sets or returns whether or not an element should be visible when not facing the screen

property backgroundΒΆ

Sets or returns all the background properties in one declaration

property backgroundAttachmentΒΆ

Sets or returns whether a background-image is fixed or scrolls with the page

property backgroundClipΒΆ

Sets or returns the painting area of the background

property backgroundColorΒΆ

Sets or returns the background-color of an element

property backgroundImageΒΆ

Sets or returns the background-image for an element

property backgroundOriginΒΆ

Sets or returns the positioning area of the background images

property backgroundPositionΒΆ

Sets or returns the starting position of a background-image

property backgroundRepeatΒΆ

Sets or returns how to repeat (tile) a background-image

property backgroundSizeΒΆ

Sets or returns the size of the background image

property borderΒΆ

Sets or returns borderWidth, borderStyle, and borderColor in one declaration

property borderBottomΒΆ

Sets or returns all the borderBottom properties in one declaration

property borderBottomColorΒΆ

Sets or returns the color of the bottom border 1

property borderBottomLeftRadiusΒΆ

Sets or returns the shape of the border of the bottom-left corner

property borderBottomRightRadiusΒΆ

Sets or returns the shape of the border of the bottom-right corner

property borderBottomStyleΒΆ

Sets or returns the style of the bottom border

property borderBottomWidthΒΆ

Sets or returns the width of the bottom border

property borderCollapseΒΆ

Sets or returns whether the table border should be collapsed into a single border, or not

property borderColorΒΆ

Sets or returns the color of an element’s border (can have up to four values)

property borderImageΒΆ

horthand property for setting or returning all the borderImage properties

property borderImageOutsetΒΆ

Sets or returns the amount by which the border image area extends beyond the border box

property borderImageRepeatΒΆ

Sets or returns whether the image-border should be repeated, rounded or stretched

property borderImageSliceΒΆ

Sets or returns the inward offsets of the image-border

property borderImageSourceΒΆ

Sets or returns the image to be used as a border

property borderImageWidthΒΆ

Sets or returns the widths of the image-border

property borderLeftΒΆ

Sets or returns all the borderLeft properties in one declaration

property borderLeftColorΒΆ

Sets or returns the color of the left border

property borderLeftStyleΒΆ

Sets or returns the style of the left border

property borderLeftWidthΒΆ

Sets or returns the width of the left border

property borderRadiusΒΆ

A shorthand property for setting or returning all the four borderRadius properties

property borderRightΒΆ

Sets or returns all the borderRight properties in one declaration

property borderRightColorΒΆ

Sets or returns the color of the right border

property borderRightStyleΒΆ

Sets or returns the style of the right border

property borderRightWidthΒΆ

Sets or returns the width of the right border

property borderSpacingΒΆ

Sets or returns the space between cells in a table

property borderStyleΒΆ

Sets or returns the style of an element’s border (can have up to four values)

property borderTopΒΆ

Sets or returns all the borderTop properties in one declaration

property borderTopColorΒΆ

Sets or returns the color of the top border

property borderTopLeftRadiusΒΆ

Sets or returns the shape of the border of the top-left corner

property borderTopRightRadiusΒΆ

Sets or returns the shape of the border of the top-right corner

property borderTopStyleΒΆ

Sets or returns the style of the top border

property borderTopWidthΒΆ

Sets or returns the width of the top border

property borderWidthΒΆ

Sets or returns the width of an element’s border (can have up to four values)

property bottomΒΆ

Sets or returns the bottom position of a positioned element

property boxDecorationBreakΒΆ

Sets or returns the behaviour of the background and border of an element at page-break, or, for in-line elements, at line-break.

property boxShadowΒΆ

ttaches one or more drop-shadows to the box

property boxSizingΒΆ

llows you to define certain elements to fit an area in a certain way

property captionSideΒΆ

Sets or returns the position of the table caption

property clearΒΆ

Sets or returns the position of the element relative to floating objects

property clipΒΆ

Sets or returns which part of a positioned element is visible

property colorΒΆ

Sets or returns the color of the text

property columnCountΒΆ

Sets or returns the number of columns an element should be divided into

property columnFillΒΆ

Sets or returns how to fill columns

property columnGapΒΆ

Sets or returns the gap between the columns

property columnRuleΒΆ

shorthand property for setting or returning all the columnRule properties

property columnRuleColorΒΆ

Sets or returns the color of the rule between columns

property columnRuleStyleΒΆ

Sets or returns the style of the rule between columns

property columnRuleWidthΒΆ

Sets or returns the width of the rule between columns

property columnSpanΒΆ

Sets or returns how many columns an element should span across

property columnWidthΒΆ

Sets or returns the width of the columns

property columnsΒΆ

horthand property for setting or returning columnWidth and columnCount

property contentΒΆ

after pseudo-elements, to insert generated content

Type

d with the

Type

before and

property counterIncrementΒΆ

Increments one or more counters

property counterResetΒΆ

Creates or resets one or more counters

property cssFloatΒΆ

Sets or returns the horizontal alignment of an element

property cursorΒΆ

Sets or returns the type of cursor to display for the mouse pointer

property directionΒΆ

Sets or returns the text direction

property displayΒΆ

Sets or returns an element’s display type

property emptyCellsΒΆ

Sets or returns whether to show the border and background of empty cells, or not

property filterΒΆ

Sets or returns image filters (visual effects, like blur and saturation)

property flexΒΆ

Sets or returns the length of the item, relative to the rest

property flexBasisΒΆ

Sets or returns the initial length of a flexible item

property flexDirectionΒΆ

Sets or returns the direction of the flexible items

property flexFlowΒΆ

A shorthand property for the flexDirection and the flexWrap properties

property flexGrowΒΆ

Sets or returns how much the item will grow relative to the rest

property flexShrinkΒΆ

Sets or returns how the item will shrink relative to the rest

property flexWrapΒΆ

Sets or returns whether the flexible items should wrap or not

property fontΒΆ

Sets or returns fontStyle, fontVariant, fontWeight, fontSize, lineHeight, and fontFamily in one declaration

property fontFamilyΒΆ

Sets or returns the font family for text

property fontSizeΒΆ

Sets or returns the font size of the text

property fontSizeAdjustΒΆ

eserves the readability of text when font fallback occurs

property fontStretchΒΆ

ects a normal, condensed, or expanded face from a font family

property fontStyleΒΆ

Sets or returns whether the style of the font is normal, italic or oblique

property fontVariantΒΆ

Sets or returns whether the font should be displayed in small capital letters

property fontWeightΒΆ

Sets or returns the boldness of the font

property hangingPunctuationΒΆ

ecifies whether a punctuation character may be placed outside the line box

property heightΒΆ

Sets or returns the height of an element

property hyphensΒΆ

Sets how to split words to improve the layout of paragraphs

property iconΒΆ

Provides the author the ability to style an element with an iconic equivalent

property imageOrientationΒΆ

Specifies a rotation in the right or clockwise direction that a user agent applies to an image

property isolationΒΆ

efines whether an element must create a new stacking content

property justifyContentΒΆ

Sets or returns the alignment between the items inside a flexible container when the items do not use all available space.

property leftΒΆ

Sets or returns the left position of a positioned element

property letterSpacingΒΆ

Sets or returns the space between characters in a text

property lineHeightΒΆ

Sets or returns the distance between lines in a text

property listStyleΒΆ

Sets or returns listStyleImage, listStylePosition, and listStyleType in one declaration

property listStyleImageΒΆ

Sets or returns an image as the list-item marker

property listStylePositionΒΆ

Sets or returns the position of the list-item marker

property listStyleTypeΒΆ

Sets or returns the list-item marker type

property marginΒΆ

Sets or returns the margins of an element (can have up to four values)

property marginBottomΒΆ

Sets or returns the bottom margin of an element

property marginLeftΒΆ

Sets or returns the left margin of an element

property marginRightΒΆ

Sets or returns the right margin of an element

property marginTopΒΆ

Sets or returns the top margin of an element

property maxHeightΒΆ

Sets or returns the maximum height of an element

property maxWidthΒΆ

Sets or returns the maximum width of an element

property minHeightΒΆ

Sets or returns the minimum height of an element

property minWidthΒΆ

Sets or returns the minimum width of an element

property navDownΒΆ

Sets or returns where to navigate when using the arrow-down navigation key

property navIndexΒΆ

Sets or returns the tabbing order for an element

property navLeftΒΆ

Sets or returns where to navigate when using the arrow-left navigation key

property navRightΒΆ

Sets or returns where to navigate when using the arrow-right navigation key

property navUpΒΆ

Sets or returns where to navigate when using the arrow-up navigation key

property objectFitΒΆ

pecifies how the contents of a replaced element should be fitted to the box established by its used height and width

property objectPositionΒΆ

ecifies the alignment of the replaced element inside its box

property opacityΒΆ

Sets or returns the opacity level for an element

property orderΒΆ

Sets or returns the order of the flexible item, relative to the rest

property orphansΒΆ

Sets or returns the minimum number of lines for an element that must be left at the bottom of a page when a page break occurs inside an element

property outlineΒΆ

Sets or returns all the outline properties in one declaration

property outlineColorΒΆ

Sets or returns the color of the outline around a element

property outlineOffsetΒΆ

ffsets an outline, and draws it beyond the border edge

property outlineStyleΒΆ

Sets or returns the style of the outline around an element

property outlineWidthΒΆ

Sets or returns the width of the outline around an element

property overflowΒΆ

Sets or returns what to do with content that renders outside the element box

property overflowXΒΆ

pecifies what to do with the left/right edges of the content, if it overflows the element’s content area

property overflowYΒΆ

pecifies what to do with the top/bottom edges of the content, if it overflows the element’s content area

property paddingΒΆ

Sets or returns the padding of an element (can have up to four values)

property paddingBottomΒΆ

Sets or returns the bottom padding of an element

property paddingLeftΒΆ

Sets or returns the left padding of an element

property paddingRightΒΆ

Sets or returns the right padding of an element

property paddingTopΒΆ

Sets or returns the top padding of an element

property pageBreakAfterΒΆ

Sets or returns the page-break behavior after an element

property pageBreakBeforeΒΆ

Sets or returns the page-break behavior before an element

property pageBreakInsideΒΆ

Sets or returns the page-break behavior inside an element

property perspectiveΒΆ

Sets or returns the perspective on how 3D elements are viewed

property perspectiveOriginΒΆ

Sets or returns the bottom position of 3D elements

property positionΒΆ

Sets or returns the type of positioning method used for an element (static, relative, absolute or fixed)

property quotesΒΆ

Sets or returns the type of quotation marks for embedded quotations

property resizeΒΆ

Sets or returns whether or not an element is resizable by the user

property rightΒΆ

Sets or returns the right position of a positioned element

property tabSizeΒΆ

Sets or returns the length of the tab-character

property tableLayoutΒΆ

Sets or returns the way to lay out table cells, rows, and columns

property textAlignΒΆ

Sets or returns the horizontal alignment of text

property textAlignLastΒΆ

Sets or returns how the last line of a block or a line right before a forced line break is aligned when text-align is justify

property textDecorationΒΆ

Sets or returns the decoration of a text

property textDecorationColorΒΆ

Sets or returns the color of the text-decoration

property textDecorationLineΒΆ

Sets or returns the type of line in a text-decoration

property textDecorationStyleΒΆ

Sets or returns the style of the line in a text decoration

property textIndentΒΆ

Sets or returns the indentation of the first line of text

property textJustifyΒΆ

Sets or returns the justification method used when text-align is justify

property textOverflowΒΆ

Sets or returns what should happen when text overflows the containing element

property textShadowΒΆ

Sets or returns the shadow effect of a text

property textTransformΒΆ

Sets or returns the capitalization of a text

property topΒΆ

Sets or returns the top position of a positioned element

property transformΒΆ

pplies a 2D or 3D transformation to an element

property transformOriginΒΆ

Sets or returns the position of transformed elements

property transformStyleΒΆ

Sets or returns how nested elements are rendered in 3D space

property transitionΒΆ

shorthand property for setting or returning the four transition properties

property transitionDelayΒΆ

Sets or returns when the transition effect will start

property transitionDurationΒΆ

Sets or returns how many seconds or milliseconds a transition effect takes to complete

property transitionPropertyΒΆ

Sets or returns the CSS property that the transition effect is for

property transitionTimingFunctionΒΆ

Sets or returns the speed curve of the transition effect

property unicodeBidiΒΆ

Sets or returns whether the text should be overridden to support multiple languages in the same document

property userSelectΒΆ

Sets or returns whether the text of an element can be selected or not

property verticalAlignΒΆ

Sets or returns the vertical alignment of the content in an element

property visibilityΒΆ

Sets or returns whether an element should be visible

property whiteSpaceΒΆ

Sets or returns how to handle tabs, line breaks and whitespace in a text 1

property widowsΒΆ

Sets or returns the minimum number of lines for an element that must be visible at the top of a page

property widthΒΆ

Sets or returns the width of an element

property wordBreakΒΆ

Sets or returns line breaking rules for non-CJK scripts

property wordSpacingΒΆ

Sets or returns the spacing between words in a text

property wordWrapΒΆ

Allows long, unbreakable words to be broken and wrap to the next line

property zIndexΒΆ

Sets or returns the stack order of a positioned element

class domonic.style.StyleSheet[source]ΒΆ

An object implementing the StyleSheet interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface.

class domonic.style.StyleSheetList(iterable=(), /)[source]ΒΆ

An instance of this object can be returned by Document.styleSheets. it can be iterated over in a standard for loop over its indices, or converted to an Array.

item(index)[source]ΒΆ

Returns the CSSStyleSheet object at the index passed in, or null if no item exists for that index.

property lengthΒΆ

Returns the number of CSSStyleSheet objects in the collection.

domonic.utilsΒΆ

snippets etc

class domonic.utils.Utils[source]ΒΆ
static acronym(sentence: str) str[source]ΒΆ

[pass a sentence, returns the acronym]

Parameters

sentence ([str]) – [typically 3 words]

Returns

[a TLA (three letter acronym)]

Return type

[str]

static case_camel(s: str) str[source]ΒΆ

case_camel(β€˜camel-case’) > β€˜camelCase’

static case_kebab(s: str) str[source]ΒΆ

kebab(β€˜camelCase’) # β€˜camel-case’

static case_snake(s: str) str[source]ΒΆ

snake(β€˜camelCase’) # β€˜camel_case’

static chunk(list: list, size: int) list[source]ΒΆ

chunk a list into batches

static chunks(iterable, size: int, format=<built-in function iter>)[source]ΒΆ

Iterate over any iterable (list, set, file, stream, strings, whatever), of ANY size

static clean(lst: list) list[source]ΒΆ

[removes falsy values (False, None, 0 and β€œβ€) from a list ]

Parameters

lst ([list]) – [lst to operate on]

Returns

[a new list with falsy values removed]

Return type

[list]

static dictify(arr: list) dict[source]ΒΆ

[turns a list into a dictionary where the list items are the keys]

Parameters

arr ([list]) – [list to change]

Returns

[a new dict where the list items are now the keys]

Return type

[dict]

static digits(text: str = '') str[source]ΒΆ

[takes a string of mix of digits and letters and returns a string of digits]

Parameters

text (str, optional) – [the text to change]. Defaults to β€˜β€™.

Returns

[a string of digits]

Return type

[str]

static escape(s: str) str[source]ΒΆ

[escape a string]

Parameters

s ([str]) – [the string to escape]

Returns

[the escaped string]

Return type

[str]

static frequency(data)[source]ΒΆ

[check the frequency of elements in the data]

Parameters

data ([type]) – [the data to check]

Returns

[a dict of elements and their frequency]

Return type

[dict]

static get_vowels(string: str) list[source]ΒΆ

[get a list of vowels from the word]

Parameters

string ([str]) – [the word to check]

Returns

[a list of vowels]

Return type

[list]

static has_internet(url: str = 'http://www.google.com/', timeout: int = 5) bool[source]ΒΆ

[check if you have internet connection]

Parameters
  • url (str, optional) – [the url to check]. Defaults to β€˜http://www.google.com/’.

  • timeout (int, optional) – [the timeout]. Defaults to 5.

Returns

[True if you have internet]

Return type

[bool]

static init_assets(dir: str = 'assets') None[source]ΒΆ

[creates an assets directory with nested js/css/img dirs]

Parameters

dir (str, optional) – [default directory name]. Defaults to β€˜assets’.

static is_linux() bool[source]ΒΆ

[check if the system is a linux]

Returns

[description]

Return type

[bool]

static is_mac() bool[source]ΒΆ

[check if the system is a mac]

Returns

[True if the system is a mac]

Return type

[bool]

static is_nix() bool[source]ΒΆ

[check if the system is a nix based system]

Returns

[True if it is a nix based system]

Return type

[bool]

static is_windows() bool[source]ΒΆ

[check if the system is a windows]

Returns

[True if windows]

Return type

[bool]

static merge_dictionaries(a: dict, b: dict) dict[source]ΒΆ

[merges 2 dicts]

Parameters
  • a ([dict]) – [dict a]

  • b ([dict]) – [dict b]

Returns

[a new dict]

Return type

[dict]

static permutations(word: str) list[source]ΒΆ

[provides all the possible permutations of a given word]

Parameters

word ([str]) – [the word to get permutations for]

Returns

[a list of permutations]

Return type

[list]

static replace_between(content: str, match: str, replacement: str, start: int = 0, end: int = 0)[source]ΒΆ

[replace some text but only between certain indexes]

Parameters
  • content (str) – [the content whos text you will be replacing]

  • match (str) – [the string to find]

  • replacement (str) – [the string to replace it with]

  • start (int, optional) – [start index]. Defaults to 0.

  • end (int, optional) – [end index]. Defaults to 0.

Returns

[the new string]

Return type

[str]

static squash(the_list: list) list[source]ΒΆ

[turns a 2d array into a flat one]

Parameters

the_list ([list]) – [a 2d array]

Returns

[a flattened 1d array]

Return type

[list]

static to_dictionary(keys: list, values: list) dict[source]ΒΆ

[take a list of keys and values and returns a dict]

Parameters
  • keys ([list]) – [a list of keys]

  • values ([list]) – [a list of value]

Returns

[a dictionary]

Return type

[dict]

static truncate(text: str = '', length: int = 0) str[source]ΒΆ

[truncates a string and appends 3 dots]

Parameters
  • text (str, optional) – [the text to truncate]. Defaults to β€˜β€™.

  • length (int, optional) – [the max length]. Defaults to 0.

Returns

[the truncated string]

Return type

[str]

static unescape(s: str) str[source]ΒΆ

[unescape a string]

Parameters

s ([str]) – [the string to unescape]

Returns

[the unescaped string]

Return type

[str]

static unique(some_arr: list) list[source]ΒΆ

[removes duplicates from a list]

Parameters

some_arr ([list]) – [list containing duplicates]

Returns

[a list containing no duplicates]

Return type

[list]

static untitle(string: str) str[source]ΒΆ

[the opposite of title]

Parameters

str ([str]) – [the string to change]

Returns

[a string with the first character set to lowercase]

Return type

[str]

static url2file(url: str) str[source]ΒΆ

[gen a safe filename from a url. by replacing β€˜/’ for β€˜_’ and β€˜:’ for β€˜__’ ]

Parameters

url ([str]) – [the url to turn into a filename]

Returns

[description]

Return type

[str]

domonic.decoratorsΒΆ

domonic.decorators.as_json(func)[source]ΒΆ

decorate any function to return json instead of a python obj note - used by JSON.py

domonic.decorators.called(before=None, error: Optional[Callable[[Exception], None]] = None)[source]ΒΆ

Decorator to call a function before and after a function call.

domonic.decorators.check(f)[source]ΒΆ

Prints entry and exit of a function to the console

domonic.decorators.deprecated(func)[source]ΒΆ

marks a function as deprecated.

domonic.decorators.el(element='div', string: bool = False)[source]ΒΆ

[wraps the results of a function in an element]

domonic.decorators.iife(before=None, error: Optional[Callable[[Exception], None]] = None)ΒΆ

Decorator to call a function before and after a function call.

domonic.decorators.instead(f, somethingelse)[source]ΒΆ

what to return if it fails

domonic.decorators.log(logger, level='info')[source]ΒΆ

@log(logging.getLogger(β€˜main’), level=’warning’)

domonic.decorators.silence(*args, **kwargs)[source]ΒΆ

stop a function from doing anything

domonic.svgΒΆ

Generate SVG with python 3

WARNING - totally not tested. except circle. I just assumed it would work…

# https://www.w3.org/TR/SVG2/eltindex.html

class domonic.svg.altGlyph(*args, **kwargs)ΒΆ
class domonic.svg.altGlyphDef(*args, **kwargs)ΒΆ
class domonic.svg.altGlyphItem(*args, **kwargs)ΒΆ
class domonic.svg.animate(*args, **kwargs)ΒΆ
class domonic.svg.animateColor(*args, **kwargs)ΒΆ
class domonic.svg.animateMotion(*args, **kwargs)ΒΆ
class domonic.svg.animateTransform(*args, **kwargs)ΒΆ
class domonic.svg.circle(*args, **kwargs)ΒΆ
class domonic.svg.clipPath(*args, **kwargs)ΒΆ
class domonic.svg.cursor(*args, **kwargs)ΒΆ
class domonic.svg.defs(*args, **kwargs)ΒΆ
class domonic.svg.desc(*args, **kwargs)ΒΆ
class domonic.svg.discard(*args, **kwargs)ΒΆ
class domonic.svg.ellipse(*args, **kwargs)ΒΆ
class domonic.svg.feBlend(*args, **kwargs)ΒΆ
class domonic.svg.feColorMatrix(*args, **kwargs)ΒΆ
class domonic.svg.feComponentTransfer(*args, **kwargs)ΒΆ
class domonic.svg.feComposite(*args, **kwargs)ΒΆ
class domonic.svg.feConvolveMatrix(*args, **kwargs)ΒΆ
class domonic.svg.feDiffuseLighting(*args, **kwargs)ΒΆ
class domonic.svg.feDisplacementMap(*args, **kwargs)ΒΆ
class domonic.svg.feDistantLight(*args, **kwargs)ΒΆ
class domonic.svg.feDropShadow(*args, **kwargs)ΒΆ
class domonic.svg.feFlood(*args, **kwargs)ΒΆ
class domonic.svg.feFuncA(*args, **kwargs)ΒΆ
class domonic.svg.feFuncB(*args, **kwargs)ΒΆ
class domonic.svg.feFuncG(*args, **kwargs)ΒΆ
class domonic.svg.feFuncR(*args, **kwargs)ΒΆ
class domonic.svg.feGaussianBlur(*args, **kwargs)ΒΆ
class domonic.svg.feImage(*args, **kwargs)ΒΆ
class domonic.svg.feMerge(*args, **kwargs)ΒΆ
class domonic.svg.feMergeNode(*args, **kwargs)ΒΆ
class domonic.svg.feMorphology(*args, **kwargs)ΒΆ
class domonic.svg.feOffset(*args, **kwargs)ΒΆ
class domonic.svg.fePointLight(*args, **kwargs)ΒΆ
class domonic.svg.feSpecularLighting(*args, **kwargs)ΒΆ
class domonic.svg.feSpotLight(*args, **kwargs)ΒΆ
class domonic.svg.feTile(*args, **kwargs)ΒΆ
class domonic.svg.feTurbulence(*args, **kwargs)ΒΆ
class domonic.svg.font(*args, **kwargs)ΒΆ
class domonic.svg.foreignObject(*args, **kwargs)ΒΆ
class domonic.svg.g(*args, **kwargs)ΒΆ
class domonic.svg.glyph(*args, **kwargs)ΒΆ
class domonic.svg.glyphRef(*args, **kwargs)ΒΆ
class domonic.svg.hatch(*args, **kwargs)ΒΆ
class domonic.svg.hatchpath(*args, **kwargs)ΒΆ
class domonic.svg.hkern(*args, **kwargs)ΒΆ
class domonic.svg.image(*args, **kwargs)ΒΆ
class domonic.svg.line(*args, **kwargs)ΒΆ
class domonic.svg.linearGradient(*args, **kwargs)ΒΆ
class domonic.svg.marker(*args, **kwargs)ΒΆ
class domonic.svg.mask(*args, **kwargs)ΒΆ
class domonic.svg.metadata(*args, **kwargs)ΒΆ
class domonic.svg.mpath(*args, **kwargs)ΒΆ
class domonic.svg.path(*args, **kwargs)ΒΆ
class domonic.svg.pattern(*args, **kwargs)ΒΆ
class domonic.svg.polygon(*args, **kwargs)ΒΆ
class domonic.svg.polyline(*args, **kwargs)ΒΆ
class domonic.svg.radialGradient(*args, **kwargs)ΒΆ
class domonic.svg.rect(*args, **kwargs)ΒΆ
class domonic.svg.solidcolor(*args, **kwargs)ΒΆ
class domonic.svg.stop(*args, **kwargs)ΒΆ
class domonic.svg.svg(*args, **kwargs)ΒΆ
class domonic.svg.switch(*args, **kwargs)ΒΆ
class domonic.svg.symbol(*args, **kwargs)ΒΆ
class domonic.svg.text(*args, **kwargs)ΒΆ
class domonic.svg.textPath(*args, **kwargs)ΒΆ
class domonic.svg.title(*args, **kwargs)ΒΆ
class domonic.svg.tref(*args, **kwargs)ΒΆ
class domonic.svg.tspan(*args, **kwargs)ΒΆ
class domonic.svg.unknown(*args, **kwargs)ΒΆ
class domonic.svg.use(*args, **kwargs)ΒΆ
class domonic.svg.view(*args, **kwargs)ΒΆ
class domonic.svg.vkern(*args, **kwargs)ΒΆ
class domonic.lerpy.tween.Tween(target=None, values=None, duration=0, equations=None, delay=0, loop=False)[source]ΒΆ

Tween is a complex lerp but you don’t have do the math cos robert penner did already. Just pass an easing equation from the easing package

i.e

twn = Tween(someObj, { β€˜x’:10, β€˜y’:5, β€˜z’:3}, 6, Linear.easeIn )

will tween the objects properties over the given time using Linear.easeIn

pause()[source]ΒΆ

Pauses the tween from changing the values

unpause()[source]ΒΆ

unpauses the tween

domonic.x3dΒΆ

Generate x3d with python 3

class domonic.xml.x3d.Anchor(*args, **kwargs)ΒΆ
domonic.xml.x3d.AppearanceΒΆ

alias of appearance

class domonic.xml.x3d.Arc2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ArcClose2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.AudioClip(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Background(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BallJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Billboard(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BinaryGeometry(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BlendMode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BlendedVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Block(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BoundaryEnhancementVolumeStyle(*args, **kwargs)ΒΆ
domonic.xml.x3d.BoxΒΆ

alias of box

class domonic.xml.x3d.BufferAccessor(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BufferGeometry(*args, **kwargs)ΒΆ
class domonic.xml.x3d.BufferView(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CADAssembly(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CADFace(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CADLayer(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CADPart(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CartoonVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Circle2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ClipPlane(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CollidableShape(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Collision(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CollisionCollection(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CollisionSensor(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Color(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ColorChaser(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ColorDamper(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ColorInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ColorMaskMode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ColorRGBA(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CommonSurfaceShader(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ComposedCubeMapTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ComposedShader(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ComposedTexture3D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ComposedVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Cone(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Coordinate(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CoordinateDamper(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CoordinateDouble(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CoordinateInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Cylinder(*args, **kwargs)ΒΆ
class domonic.xml.x3d.CylinderSensor(*args, **kwargs)ΒΆ
class domonic.xml.x3d.DepthMode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.DirectionalLight(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Dish(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Disk2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.DoubleAxisHingeJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.DynamicLOD(*args, **kwargs)ΒΆ
class domonic.xml.x3d.EdgeEnhancementVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ElevationGrid(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Environment(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Extrusion(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Field(*args, **kwargs)ΒΆ
class domonic.xml.x3d.FloatVertexAttribute(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Fog(*args, **kwargs)ΒΆ
class domonic.xml.x3d.FontStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeneratedCubeMapTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoCoordinate(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoElevationGrid(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoLOD(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoLocation(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoMetadata(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoOrigin(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoPositionInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoTransform(*args, **kwargs)ΒΆ
class domonic.xml.x3d.GeoViewpoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Group(*args, **kwargs)ΒΆ
class domonic.xml.x3d.HAnimDisplacer(*args, **kwargs)ΒΆ
class domonic.xml.x3d.HAnimHumanoid(*args, **kwargs)ΒΆ
class domonic.xml.x3d.HAnimJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.HAnimSegment(*args, **kwargs)ΒΆ
class domonic.xml.x3d.HAnimSite(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ImageTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ImageTexture3D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ImageTextureAtlas(*args, **kwargs)ΒΆ
class domonic.xml.x3d.IndexedFaceSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.IndexedLineSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.IndexedQuadSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.IndexedTriangleSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.IndexedTriangleStripSet(*args, **kwargs)ΒΆ
domonic.xml.x3d.InlineΒΆ

alias of inline

class domonic.xml.x3d.IsoSurfaceVolumeData(*args, **kwargs)ΒΆ
class domonic.xml.x3d.LOD(*args, **kwargs)ΒΆ
class domonic.xml.x3d.LineProperties(*args, **kwargs)ΒΆ
class domonic.xml.x3d.LineSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MPRPlane(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MPRVolumeStyle(*args, **kwargs)ΒΆ
domonic.xml.x3d.MaterialΒΆ

alias of material

class domonic.xml.x3d.MatrixTextureTransform(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MatrixTransform(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Mesh(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MetadataBoolean(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MetadataDouble(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MetadataFloat(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MetadataInteger(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MetadataSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MetadataString(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MotorJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MovieTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MultiTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.MultiTextureCoordinate(*args, **kwargs)ΒΆ
class domonic.xml.x3d.NavigationInfo(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Normal(*args, **kwargs)ΒΆ
class domonic.xml.x3d.NormalInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Nozzle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.OpacityMapVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.OrientationChaser(*args, **kwargs)ΒΆ
class domonic.xml.x3d.OrientationDamper(*args, **kwargs)ΒΆ
class domonic.xml.x3d.OrientationInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.OrthoViewpoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Param(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ParticleSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PhysicalEnvironmentLight(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PhysicalMaterial(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PixelTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PixelTexture3D(*args, **kwargs)ΒΆ
domonic.xml.x3d.PlaneΒΆ

alias of plane

class domonic.xml.x3d.PlaneSensor(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PointLight(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PointSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Polyline2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Polypoint2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PopGeometry(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PopGeometryLevel(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PositionChaser(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PositionChaser2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PositionDamper(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PositionDamper2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PositionInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.PositionInterpolator2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ProjectionVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Pyramid(*args, **kwargs)ΒΆ
class domonic.xml.x3d.QuadSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RadarVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Rectangle2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RectangularTorus(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RefinementTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RemoteSelectionGroup(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RenderedTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RigidBody(*args, **kwargs)ΒΆ
class domonic.xml.x3d.RigidBodyCollection(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Route(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ScalarChaser(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ScalarDamper(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ScalarInterpolator(*args, **kwargs)ΒΆ
domonic.xml.x3d.SceneΒΆ

alias of scene

class domonic.xml.x3d.SegmentedVolumeData(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ShadedVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.ShaderPart(*args, **kwargs)ΒΆ
domonic.xml.x3d.ShapeΒΆ

alias of shape

class domonic.xml.x3d.SilhouetteEnhancementVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SingleAxisHingeJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SliderJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SlopedCylinder(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Snout(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SolidOfRevolution(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Sound(*args, **kwargs)ΒΆ
domonic.xml.x3d.SphereΒΆ

alias of sphere

class domonic.xml.x3d.SphereSegment(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SphereSensor(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SplinePositionInterpolator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SpotLight(*args, **kwargs)ΒΆ
class domonic.xml.x3d.StaticGroup(*args, **kwargs)ΒΆ
class domonic.xml.x3d.StippleVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.SurfaceShaderTexture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Switch(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TexCoordDamper2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Text(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Texture(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureCoordinate(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureCoordinate3D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureCoordinateGenerator(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureProperties(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureTransform(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureTransform3D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TextureTransformMatrix3D(*args, **kwargs)ΒΆ
domonic.xml.x3d.TimeSensorΒΆ

alias of timeSensor

class domonic.xml.x3d.ToneMappedVolumeStyle(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Torus(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TouchSensor(*args, **kwargs)ΒΆ
domonic.xml.x3d.TransformΒΆ

alias of transform

class domonic.xml.x3d.TriangleSet(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TriangleSet2D(*args, **kwargs)ΒΆ
class domonic.xml.x3d.TwoSidedMaterial(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Uniform(*args, **kwargs)ΒΆ
class domonic.xml.x3d.UniversalJoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Viewfrustum(*args, **kwargs)ΒΆ
class domonic.xml.x3d.Viewpoint(*args, **kwargs)ΒΆ
class domonic.xml.x3d.VolumeData(*args, **kwargs)ΒΆ
class domonic.xml.x3d.WorldInfo(*args, **kwargs)ΒΆ
domonic.xml.x3d.X3DΒΆ

alias of x3d

class domonic.xml.x3d.X3DAppearanceChildNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DAppearanceNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DBackgroundNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DBinaryContainerGeometryNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DBindableNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DBoundedObject(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DChaserNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DChildNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DColorNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DComposableVolumeRenderStyleNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DComposedGeometryNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DCoordinateNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DDamperNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DDragSensorNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DEnvironmentNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DEnvironmentTextureNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DFogNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DFollowerNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DFontStyleNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DGeometricPropertyNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DGeometryNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DGroupingNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DInfoNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DInterpolatorNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DLODNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DLightNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DMaterialNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DMetadataObject(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DNBodyCollidableNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DNavigationInfoNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DPlanarGeometryNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DPointingDeviceSensorNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DRigidJointNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DSensorNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DShaderNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DShapeNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DSoundNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DSoundSourceNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DSpatialGeometryNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTexture3DNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTextureCoordinateNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTextureNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTextureTransformNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTimeDependentNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTouchSensorNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DTransformNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DVertexAttributeNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DViewpointNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DVolumeDataNode(*args, **kwargs)ΒΆ
class domonic.xml.x3d.X3DVolumeRenderStyleNode(*args, **kwargs)ΒΆ
domonic.xml.x3d.anchorΒΆ

alias of Anchor

class domonic.xml.x3d.appearance(*args, **kwargs)ΒΆ
domonic.xml.x3d.arc2DΒΆ

alias of Arc2D

domonic.xml.x3d.arcClose2DΒΆ

alias of ArcClose2D

domonic.xml.x3d.audioClipΒΆ

alias of AudioClip

domonic.xml.x3d.backgroundΒΆ

alias of Background

domonic.xml.x3d.ballJointΒΆ

alias of BallJoint

domonic.xml.x3d.billboardΒΆ

alias of Billboard

domonic.xml.x3d.binaryGeometryΒΆ

alias of BinaryGeometry

domonic.xml.x3d.blendModeΒΆ

alias of BlendMode

domonic.xml.x3d.blendedVolumeStyleΒΆ

alias of BlendedVolumeStyle

domonic.xml.x3d.blockΒΆ

alias of Block

domonic.xml.x3d.boundaryEnhancementVolumeStyleΒΆ

alias of BoundaryEnhancementVolumeStyle

class domonic.xml.x3d.box(*args, **kwargs)ΒΆ
domonic.xml.x3d.bufferAccessorΒΆ

alias of BufferAccessor

domonic.xml.x3d.bufferGeometryΒΆ

alias of BufferGeometry

domonic.xml.x3d.bufferViewΒΆ

alias of BufferView

domonic.xml.x3d.cADAssemblyΒΆ

alias of CADAssembly

domonic.xml.x3d.cADFaceΒΆ

alias of CADFace

domonic.xml.x3d.cADLayerΒΆ

alias of CADLayer

domonic.xml.x3d.cADPartΒΆ

alias of CADPart

domonic.xml.x3d.cartoonVolumeStyleΒΆ

alias of CartoonVolumeStyle

domonic.xml.x3d.circle2DΒΆ

alias of Circle2D

domonic.xml.x3d.clipPlaneΒΆ

alias of ClipPlane

domonic.xml.x3d.collidableShapeΒΆ

alias of CollidableShape

domonic.xml.x3d.collisionΒΆ

alias of Collision

domonic.xml.x3d.collisionCollectionΒΆ

alias of CollisionCollection

domonic.xml.x3d.collisionSensorΒΆ

alias of CollisionSensor

domonic.xml.x3d.colorΒΆ

alias of Color

domonic.xml.x3d.colorChaserΒΆ

alias of ColorChaser

domonic.xml.x3d.colorDamperΒΆ

alias of ColorDamper

domonic.xml.x3d.colorInterpolatorΒΆ

alias of ColorInterpolator

domonic.xml.x3d.colorMaskModeΒΆ

alias of ColorMaskMode

domonic.xml.x3d.colorRGBAΒΆ

alias of ColorRGBA

domonic.xml.x3d.commonSurfaceShaderΒΆ

alias of CommonSurfaceShader

domonic.xml.x3d.composedCubeMapTextureΒΆ

alias of ComposedCubeMapTexture

domonic.xml.x3d.composedShaderΒΆ

alias of ComposedShader

domonic.xml.x3d.composedTexture3DΒΆ

alias of ComposedTexture3D

domonic.xml.x3d.composedVolumeStyleΒΆ

alias of ComposedVolumeStyle

domonic.xml.x3d.coneΒΆ

alias of Cone

domonic.xml.x3d.coordinateΒΆ

alias of Coordinate

domonic.xml.x3d.coordinateDamperΒΆ

alias of CoordinateDamper

domonic.xml.x3d.coordinateDoubleΒΆ

alias of CoordinateDouble

domonic.xml.x3d.coordinateInterpolatorΒΆ

alias of CoordinateInterpolator

domonic.xml.x3d.cylinderΒΆ

alias of Cylinder

domonic.xml.x3d.cylinderSensorΒΆ

alias of CylinderSensor

domonic.xml.x3d.depthModeΒΆ

alias of DepthMode

domonic.xml.x3d.directionalLightΒΆ

alias of DirectionalLight

domonic.xml.x3d.dishΒΆ

alias of Dish

domonic.xml.x3d.disk2DΒΆ

alias of Disk2D

domonic.xml.x3d.doubleAxisHingeJointΒΆ

alias of DoubleAxisHingeJoint

domonic.xml.x3d.dynamicLODΒΆ

alias of DynamicLOD

domonic.xml.x3d.edgeEnhancementVolumeStyleΒΆ

alias of EdgeEnhancementVolumeStyle

domonic.xml.x3d.elevationGridΒΆ

alias of ElevationGrid

domonic.xml.x3d.environmentΒΆ

alias of Environment

domonic.xml.x3d.extrusionΒΆ

alias of Extrusion

domonic.xml.x3d.fieldΒΆ

alias of Field

domonic.xml.x3d.floatVertexAttributeΒΆ

alias of FloatVertexAttribute

domonic.xml.x3d.fogΒΆ

alias of Fog

domonic.xml.x3d.fontStyleΒΆ

alias of FontStyle

domonic.xml.x3d.generatedCubeMapTextureΒΆ

alias of GeneratedCubeMapTexture

domonic.xml.x3d.geoCoordinateΒΆ

alias of GeoCoordinate

domonic.xml.x3d.geoElevationGridΒΆ

alias of GeoElevationGrid

domonic.xml.x3d.geoLODΒΆ

alias of GeoLOD

domonic.xml.x3d.geoLocationΒΆ

alias of GeoLocation

domonic.xml.x3d.geoMetadataΒΆ

alias of GeoMetadata

domonic.xml.x3d.geoOriginΒΆ

alias of GeoOrigin

domonic.xml.x3d.geoPositionInterpolatorΒΆ

alias of GeoPositionInterpolator

domonic.xml.x3d.geoTransformΒΆ

alias of GeoTransform

domonic.xml.x3d.geoViewpointΒΆ

alias of GeoViewpoint

domonic.xml.x3d.groupΒΆ

alias of Group

domonic.xml.x3d.hAnimDisplacerΒΆ

alias of HAnimDisplacer

domonic.xml.x3d.hAnimHumanoidΒΆ

alias of HAnimHumanoid

domonic.xml.x3d.hAnimJointΒΆ

alias of HAnimJoint

domonic.xml.x3d.hAnimSegmentΒΆ

alias of HAnimSegment

domonic.xml.x3d.hAnimSiteΒΆ

alias of HAnimSite

domonic.xml.x3d.imageTextureΒΆ

alias of ImageTexture

domonic.xml.x3d.imageTexture3DΒΆ

alias of ImageTexture3D

domonic.xml.x3d.imageTextureAtlasΒΆ

alias of ImageTextureAtlas

domonic.xml.x3d.indexedFaceSetΒΆ

alias of IndexedFaceSet

domonic.xml.x3d.indexedLineSetΒΆ

alias of IndexedLineSet

domonic.xml.x3d.indexedQuadSetΒΆ

alias of IndexedQuadSet

domonic.xml.x3d.indexedTriangleSetΒΆ

alias of IndexedTriangleSet

domonic.xml.x3d.indexedTriangleStripSetΒΆ

alias of IndexedTriangleStripSet

class domonic.xml.x3d.inline(*args, **kwargs)ΒΆ
domonic.xml.x3d.isoSurfaceVolumeDataΒΆ

alias of IsoSurfaceVolumeData

domonic.xml.x3d.lODΒΆ

alias of LOD

domonic.xml.x3d.linePropertiesΒΆ

alias of LineProperties

domonic.xml.x3d.lineSetΒΆ

alias of LineSet

domonic.xml.x3d.mPRPlaneΒΆ

alias of MPRPlane

domonic.xml.x3d.mPRVolumeStyleΒΆ

alias of MPRVolumeStyle

class domonic.xml.x3d.material(*args, **kwargs)ΒΆ
domonic.xml.x3d.matrixTextureTransformΒΆ

alias of MatrixTextureTransform

domonic.xml.x3d.matrixTransformΒΆ

alias of MatrixTransform

domonic.xml.x3d.meshΒΆ

alias of Mesh

domonic.xml.x3d.metadataBooleanΒΆ

alias of MetadataBoolean

domonic.xml.x3d.metadataDoubleΒΆ

alias of MetadataDouble

domonic.xml.x3d.metadataFloatΒΆ

alias of MetadataFloat

domonic.xml.x3d.metadataIntegerΒΆ

alias of MetadataInteger

domonic.xml.x3d.metadataSetΒΆ

alias of MetadataSet

domonic.xml.x3d.metadataStringΒΆ

alias of MetadataString

domonic.xml.x3d.motorJointΒΆ

alias of MotorJoint

domonic.xml.x3d.movieTextureΒΆ

alias of MovieTexture

domonic.xml.x3d.multiTextureΒΆ

alias of MultiTexture

domonic.xml.x3d.multiTextureCoordinateΒΆ

alias of MultiTextureCoordinate

domonic.xml.x3d.navigationInfoΒΆ

alias of NavigationInfo

domonic.xml.x3d.normalΒΆ

alias of Normal

domonic.xml.x3d.normalInterpolatorΒΆ

alias of NormalInterpolator

domonic.xml.x3d.nozzleΒΆ

alias of Nozzle

domonic.xml.x3d.opacityMapVolumeStyleΒΆ

alias of OpacityMapVolumeStyle

domonic.xml.x3d.orientationChaserΒΆ

alias of OrientationChaser

domonic.xml.x3d.orientationDamperΒΆ

alias of OrientationDamper

domonic.xml.x3d.orientationInterpolatorΒΆ

alias of OrientationInterpolator

domonic.xml.x3d.orthoViewpointΒΆ

alias of OrthoViewpoint

domonic.xml.x3d.paramΒΆ

alias of Param

domonic.xml.x3d.particleSetΒΆ

alias of ParticleSet

domonic.xml.x3d.physicalEnvironmentLightΒΆ

alias of PhysicalEnvironmentLight

domonic.xml.x3d.physicalMaterialΒΆ

alias of PhysicalMaterial

domonic.xml.x3d.pixelTextureΒΆ

alias of PixelTexture

domonic.xml.x3d.pixelTexture3DΒΆ

alias of PixelTexture3D

class domonic.xml.x3d.plane(*args, **kwargs)ΒΆ
domonic.xml.x3d.planeSensorΒΆ

alias of PlaneSensor

domonic.xml.x3d.pointLightΒΆ

alias of PointLight

domonic.xml.x3d.pointSetΒΆ

alias of PointSet

domonic.xml.x3d.polyline2DΒΆ

alias of Polyline2D

domonic.xml.x3d.polypoint2DΒΆ

alias of Polypoint2D

domonic.xml.x3d.popGeometryΒΆ

alias of PopGeometry

domonic.xml.x3d.popGeometryLevelΒΆ

alias of PopGeometryLevel

domonic.xml.x3d.positionChaserΒΆ

alias of PositionChaser

domonic.xml.x3d.positionChaser2DΒΆ

alias of PositionChaser2D

domonic.xml.x3d.positionDamperΒΆ

alias of PositionDamper

domonic.xml.x3d.positionDamper2DΒΆ

alias of PositionDamper2D

domonic.xml.x3d.positionInterpolatorΒΆ

alias of PositionInterpolator

domonic.xml.x3d.positionInterpolator2DΒΆ

alias of PositionInterpolator2D

domonic.xml.x3d.projectionVolumeStyleΒΆ

alias of ProjectionVolumeStyle

domonic.xml.x3d.pyramidΒΆ

alias of Pyramid

domonic.xml.x3d.quadSetΒΆ

alias of QuadSet

domonic.xml.x3d.radarVolumeStyleΒΆ

alias of RadarVolumeStyle

domonic.xml.x3d.rectangle2DΒΆ

alias of Rectangle2D

domonic.xml.x3d.rectangularTorusΒΆ

alias of RectangularTorus

domonic.xml.x3d.refinementTextureΒΆ

alias of RefinementTexture

domonic.xml.x3d.remoteSelectionGroupΒΆ

alias of RemoteSelectionGroup

domonic.xml.x3d.renderedTextureΒΆ

alias of RenderedTexture

domonic.xml.x3d.rigidBodyΒΆ

alias of RigidBody

domonic.xml.x3d.rigidBodyCollectionΒΆ

alias of RigidBodyCollection

domonic.xml.x3d.routeΒΆ

alias of Route

domonic.xml.x3d.scalarChaserΒΆ

alias of ScalarChaser

domonic.xml.x3d.scalarDamperΒΆ

alias of ScalarDamper

domonic.xml.x3d.scalarInterpolatorΒΆ

alias of ScalarInterpolator

class domonic.xml.x3d.scene(*args, **kwargs)ΒΆ
domonic.xml.x3d.segmentedVolumeDataΒΆ

alias of SegmentedVolumeData

domonic.xml.x3d.shadedVolumeStyleΒΆ

alias of ShadedVolumeStyle

domonic.xml.x3d.shaderPartΒΆ

alias of ShaderPart

class domonic.xml.x3d.shape(*args, **kwargs)ΒΆ
domonic.xml.x3d.silhouetteEnhancementVolumeStyleΒΆ

alias of SilhouetteEnhancementVolumeStyle

domonic.xml.x3d.singleAxisHingeJointΒΆ

alias of SingleAxisHingeJoint

domonic.xml.x3d.sliderJointΒΆ

alias of SliderJoint

domonic.xml.x3d.slopedCylinderΒΆ

alias of SlopedCylinder

domonic.xml.x3d.snoutΒΆ

alias of Snout

domonic.xml.x3d.solidOfRevolutionΒΆ

alias of SolidOfRevolution

domonic.xml.x3d.soundΒΆ

alias of Sound

class domonic.xml.x3d.sphere(*args, **kwargs)ΒΆ
domonic.xml.x3d.sphereSegmentΒΆ

alias of SphereSegment

domonic.xml.x3d.sphereSensorΒΆ

alias of SphereSensor

domonic.xml.x3d.splinePositionInterpolatorΒΆ

alias of SplinePositionInterpolator

domonic.xml.x3d.spotLightΒΆ

alias of SpotLight

domonic.xml.x3d.staticGroupΒΆ

alias of StaticGroup

domonic.xml.x3d.stippleVolumeStyleΒΆ

alias of StippleVolumeStyle

domonic.xml.x3d.surfaceShaderTextureΒΆ

alias of SurfaceShaderTexture

domonic.xml.x3d.switchΒΆ

alias of Switch

domonic.xml.x3d.texCoordDamper2DΒΆ

alias of TexCoordDamper2D

domonic.xml.x3d.textΒΆ

alias of Text

domonic.xml.x3d.textureΒΆ

alias of Texture

domonic.xml.x3d.textureCoordinateΒΆ

alias of TextureCoordinate

domonic.xml.x3d.textureCoordinate3DΒΆ

alias of TextureCoordinate3D

domonic.xml.x3d.textureCoordinateGeneratorΒΆ

alias of TextureCoordinateGenerator

domonic.xml.x3d.texturePropertiesΒΆ

alias of TextureProperties

domonic.xml.x3d.textureTransformΒΆ

alias of TextureTransform

domonic.xml.x3d.textureTransform3DΒΆ

alias of TextureTransform3D

domonic.xml.x3d.textureTransformMatrix3DΒΆ

alias of TextureTransformMatrix3D

class domonic.xml.x3d.timeSensor(*args, **kwargs)ΒΆ
domonic.xml.x3d.toneMappedVolumeStyleΒΆ

alias of ToneMappedVolumeStyle

domonic.xml.x3d.torusΒΆ

alias of Torus

domonic.xml.x3d.touchSensorΒΆ

alias of TouchSensor

class domonic.xml.x3d.transform(*args, **kwargs)ΒΆ
domonic.xml.x3d.triangleSetΒΆ

alias of TriangleSet

domonic.xml.x3d.triangleSet2DΒΆ

alias of TriangleSet2D

domonic.xml.x3d.twoSidedMaterialΒΆ

alias of TwoSidedMaterial

domonic.xml.x3d.uniformΒΆ

alias of Uniform

domonic.xml.x3d.universalJointΒΆ

alias of UniversalJoint

domonic.xml.x3d.viewfrustumΒΆ

alias of Viewfrustum

domonic.xml.x3d.viewpointΒΆ

alias of Viewpoint

domonic.xml.x3d.volumeDataΒΆ

alias of VolumeData

domonic.xml.x3d.worldInfoΒΆ

alias of WorldInfo

domonic.xml.x3d.x3DAppearanceChildNodeΒΆ

alias of X3DAppearanceChildNode

domonic.xml.x3d.x3DAppearanceNodeΒΆ

alias of X3DAppearanceNode

domonic.xml.x3d.x3DBackgroundNodeΒΆ

alias of X3DBackgroundNode

domonic.xml.x3d.x3DBinaryContainerGeometryNodeΒΆ

alias of X3DBinaryContainerGeometryNode

domonic.xml.x3d.x3DBindableNodeΒΆ

alias of X3DBindableNode

domonic.xml.x3d.x3DBoundedObjectΒΆ

alias of X3DBoundedObject

domonic.xml.x3d.x3DChaserNodeΒΆ

alias of X3DChaserNode

domonic.xml.x3d.x3DChildNodeΒΆ

alias of X3DChildNode

domonic.xml.x3d.x3DColorNodeΒΆ

alias of X3DColorNode

domonic.xml.x3d.x3DComposableVolumeRenderStyleNodeΒΆ

alias of X3DComposableVolumeRenderStyleNode

domonic.xml.x3d.x3DComposedGeometryNodeΒΆ

alias of X3DComposedGeometryNode

domonic.xml.x3d.x3DCoordinateNodeΒΆ

alias of X3DCoordinateNode

domonic.xml.x3d.x3DDamperNodeΒΆ

alias of X3DDamperNode

domonic.xml.x3d.x3DDragSensorNodeΒΆ

alias of X3DDragSensorNode

domonic.xml.x3d.x3DEnvironmentNodeΒΆ

alias of X3DEnvironmentNode

domonic.xml.x3d.x3DEnvironmentTextureNodeΒΆ

alias of X3DEnvironmentTextureNode

domonic.xml.x3d.x3DFogNodeΒΆ

alias of X3DFogNode

domonic.xml.x3d.x3DFollowerNodeΒΆ

alias of X3DFollowerNode

domonic.xml.x3d.x3DFontStyleNodeΒΆ

alias of X3DFontStyleNode

domonic.xml.x3d.x3DGeometricPropertyNodeΒΆ

alias of X3DGeometricPropertyNode

domonic.xml.x3d.x3DGeometryNodeΒΆ

alias of X3DGeometryNode

domonic.xml.x3d.x3DGroupingNodeΒΆ

alias of X3DGroupingNode

domonic.xml.x3d.x3DInfoNodeΒΆ

alias of X3DInfoNode

domonic.xml.x3d.x3DInterpolatorNodeΒΆ

alias of X3DInterpolatorNode

domonic.xml.x3d.x3DLODNodeΒΆ

alias of X3DLODNode

domonic.xml.x3d.x3DLightNodeΒΆ

alias of X3DLightNode

domonic.xml.x3d.x3DMaterialNodeΒΆ

alias of X3DMaterialNode

domonic.xml.x3d.x3DMetadataObjectΒΆ

alias of X3DMetadataObject

domonic.xml.x3d.x3DNBodyCollidableNodeΒΆ

alias of X3DNBodyCollidableNode

domonic.xml.x3d.x3DNavigationInfoNodeΒΆ

alias of X3DNavigationInfoNode

domonic.xml.x3d.x3DNodeΒΆ

alias of X3DNode

domonic.xml.x3d.x3DPlanarGeometryNodeΒΆ

alias of X3DPlanarGeometryNode

domonic.xml.x3d.x3DPointingDeviceSensorNodeΒΆ

alias of X3DPointingDeviceSensorNode

domonic.xml.x3d.x3DRigidJointNodeΒΆ

alias of X3DRigidJointNode

domonic.xml.x3d.x3DSensorNodeΒΆ

alias of X3DSensorNode

domonic.xml.x3d.x3DShaderNodeΒΆ

alias of X3DShaderNode

domonic.xml.x3d.x3DShapeNodeΒΆ

alias of X3DShapeNode

domonic.xml.x3d.x3DSoundNodeΒΆ

alias of X3DSoundNode

domonic.xml.x3d.x3DSoundSourceNodeΒΆ

alias of X3DSoundSourceNode

domonic.xml.x3d.x3DSpatialGeometryNodeΒΆ

alias of X3DSpatialGeometryNode

domonic.xml.x3d.x3DTexture3DNodeΒΆ

alias of X3DTexture3DNode

domonic.xml.x3d.x3DTextureCoordinateNodeΒΆ

alias of X3DTextureCoordinateNode

domonic.xml.x3d.x3DTextureNodeΒΆ

alias of X3DTextureNode

domonic.xml.x3d.x3DTextureTransformNodeΒΆ

alias of X3DTextureTransformNode

domonic.xml.x3d.x3DTimeDependentNodeΒΆ

alias of X3DTimeDependentNode

domonic.xml.x3d.x3DTouchSensorNodeΒΆ

alias of X3DTouchSensorNode

domonic.xml.x3d.x3DTransformNodeΒΆ

alias of X3DTransformNode

domonic.xml.x3d.x3DVertexAttributeNodeΒΆ

alias of X3DVertexAttributeNode

domonic.xml.x3d.x3DViewpointNodeΒΆ

alias of X3DViewpointNode

domonic.xml.x3d.x3DVolumeDataNodeΒΆ

alias of X3DVolumeDataNode

domonic.xml.x3d.x3DVolumeRenderStyleNodeΒΆ

alias of X3DVolumeRenderStyleNode

class domonic.xml.x3d.x3d(*args, **kwargs)ΒΆ

domonic.geomΒΆ

written by.ai

class domonic.geom.matrix(m)[source]ΒΆ

[matrixs]

rotate(pt)[source]ΒΆ

Rotates the point on the vector defined by the vectors m[0] and m[1].

scale(pt)[source]ΒΆ

Scales the point on the vector defined by the vectors m[0] and m[1].

translate(pt)[source]ΒΆ

Translates the point on the vector defined by the vectors m[0] and m[1].

domonic.sitemapΒΆ

generate or load sitemaps

warning - when using image and video tags from this package they will be namespaced i.e <image:image> and <video:video> so i’d advise to only import them within the def that you use them in to avoid conflict with html.image

class domonic.xml.sitemap.changefreq(*args, **kwargs)ΒΆ
class domonic.xml.sitemap.lastmod(*args, **kwargs)ΒΆ
class domonic.xml.sitemap.loc(*args, **kwargs)ΒΆ
class domonic.xml.sitemap.priority(*args, **kwargs)ΒΆ
class domonic.xml.sitemap.sitemap(*args, **kwargs)ΒΆ
domonic.xml.sitemap.sitemap_format(self, *args, **kwargs)[source]ΒΆ

attempts to prettify the output of the sitemap.

domonic.xml.sitemap.sitemap_from_urls(urls)[source]ΒΆ

Create a sitemap from a list of urls.add()

Note: This won’t allow you to add priority or changefreq of the urls. or add images etc tho u could loop the nodes afterwards and do that.

WARNING: there’s a difference between a sitemap index and a sitemap. make sure you know what you want.

class domonic.xml.sitemap.sitemapindex(*args, **kwargs)ΒΆ
domonic.xml.sitemap.sitemapindex_from_urls(urls)[source]ΒΆ

Create a sitemap index from a list of urls.

WARNING: there’s a difference between a sitemap index and a sitemap. make sure you know what you want.

# i.e

# <?xml version=”1.0” encoding=”UTF-8”?> # <sitemapindex xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9”> # <sitemap> # <loc>https://xyz.com/sitemap1.xml</loc> # <lastmod>2021-07-08T13:12:16+00:00</lastmod> # </sitemap> # </sitemapindex>

class domonic.xml.sitemap.url(*args, **kwargs)ΒΆ
class domonic.xml.sitemap.urlset(*args, **kwargs)ΒΆ

domonic.webapi.urlΒΆ

https://developer.mozilla.org/en-US/docs/Web/API/URL

# TODO - move the unit tests for this class from javascript to webapi # TODO - untested

class domonic.webapi.url.URL(url: str = '', *args, **kwargs)[source]ΒΆ

a-tag extends from URL

property hashΒΆ

” hash Sets or returns the anchor part (#) of a URL

class domonic.webapi.url.URLSearchParams(paramString)[source]ΒΆ

[utility methods to work with the query string of a URL]

append(key, value)[source]ΒΆ

Appends a specified key/value pair as a new search parameter

delete(key)[source]ΒΆ

Deletes the given search parameter, and its associated value, from the list of all search parameters.

entries()[source]ΒΆ

Returns an iterator allowing iteration through all key/value pairs contained in this object.

forEach(func)[source]ΒΆ

Allows iteration through all values contained in this object via a callback function.

get(key)[source]ΒΆ

Returns the first value associated with the given search parameter.

getAll(key)[source]ΒΆ

Returns all the values associated with a given search parameter.

has(key)[source]ΒΆ

Returns a Boolean indicating if such a given parameter exists.

keys()[source]ΒΆ

Returns an iterator allowing iteration through all keys of the key/value pairs contained in this object.

set(key, value)[source]ΒΆ

Sets the value associated with a given search parameter to the given value. If there are several values, the others are deleted.

sort()[source]ΒΆ

Sorts all key/value pairs, if any, by their keys.

toString()[source]ΒΆ

Returns a string containing a query string suitable for use in a URL.

values()[source]ΒΆ

Returns an iterator allowing iteration through all values of the key/value pairs contained in this object.

domonic.webapi.fetchΒΆ

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API