html-creator
Python library to dynamically generate html in an etree-like structure
Docs
Document(title=''): Your HTML document.
Args
- title: The title of your document. This is optional and can be specified later
Methods
- Using
str()on this object will return the formatted html content of the Document.
Properties
Document.children: The direct children of the documentDocument.head: The head tag of the document (automatically generated)Document.body: The body tag of the document (automatically generated)
Element(tag='p',attrs={},content=''): A single HTML element/tag
Args
- tag: The tag name, like div, p, or h1
- attrs: The attributes of the element, in a dict
- content: Text content of your tag
Methods
- Using
str()on this object will return the formatted html tag, including formatted html versions of all child tags - Using
len(Element object)will return the number of children - Using
Element[index]will return the element at that index - Using
Element.append(new Element object instance)orElement.add_child(new Element object instance)adds a child Element to the Element
Properties
tag,attrs,content: See Argschildren: The direct children on the Element
CSS(Dict={}): A utility class for generating CSS
Args
- Dict: Specifies a starting dictionary (Must be in form
{selector: {property: value,property: value,property: value}, selector2: {property: value,property: value,property: value}})
Methods
del CSS[selector]andCSS[selector], respectively, delete and get the specified selector in the CSS objectadd_sel(selector): Adds a selector to add properties toadd_property(selector, property, value): Adds propertypropertywith valuevalueto selectorselectordel_property(selector, property): Deletes propertypropertyfrom selectorselectorstr(CSS object): Returns a formatted CSS string
Properties
dict: The dictionary used by the CSS object. Can be edited directly, but could cause issues
Metadata
Release files for html-creator 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| html_creator-1.1.tar.gz | 2.7 kB | Without provenance | Details for html_creator-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| html_creator-1.1-py3-none-any.whl | Python 3 | none | any | Details for html_creator-1.1-py3-none-any.whl |
Total release size: 6.7 kB
Release files / html_creator-1.1.tar.gz
| Download URL | html_creator-1.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcff0dd39714fa4dc93986a773984b8fb3de2383e2e18d030810d1200cfa93cb
|
|
BLAKE2b-256 checksum How to use checksums |
5594549886c8c527b4ae5d844eb13c07c75e274e2d9d6bdc047350c3fd822f61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.4
|
Release files / html_creator-1.1-py3-none-any.whl
| Download URL | html_creator-1.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9630944441ec0497f7e6de8478abcfe11d90fb6e9f936acdb4807af23c5ba60
|
|
BLAKE2b-256 checksum How to use checksums |
5f4c6c4cd7d6d25457d27b0e8c0cdddebb373a975d23e2bd585b43c10810ceb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.4
|
Security for html-creator 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.