MyPy8TML
A new way to create a html code inside python
Status of project: in progress...
Download
$pip install mypy8tml
Easy start
Generating a simple code:
from mypy_8tml import MyPy8TML
html = MyPy8TML()
html.h1['Hello world']()
code = html.generate()
print(code)
- Use MyPy8TML( ) to start the class
- Call the property (name of tag)
- Put content between the tag using -> []
- close tag calling the class -> ()
Using flask to render code
So let's do a form
Remember to download Flask first
pip install flask
Pyhton code:
from flask import Flask, render_template_string
from mypy_8tml import MyPy8TML
app = Flask(__name__)
register = MyPy8TML().init_html('Form', 'pt')
register.div.in_class('flex-box')\
.form.in_class('form')\
.h1[' Just a simple form']()\
.p['e-mail :'](-1).input.in_type('email')()\
.p['password :'](-1).input.in_type('password')()\
.button.in_type('submit')['submit']()
@app.route('/')
def index():
return render_template_string(register.generate())
app.run(debug=True)
Metadata
Release files for mypy8tml 0.2.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 |
|---|---|---|---|---|
| mypy8tml-0.2.1.tar.gz | 10.1 kB | Without provenance | Details for mypy8tml-0.2.1.tar.gz |
Release files / mypy8tml-0.2.1.tar.gz
| Download URL | mypy8tml-0.2.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a313416a34087ef40827d53996d36f27d1cb2aed35d8abcef7e5fd1afd6fa789
|
|
BLAKE2b-256 checksum How to use checksums |
2d3911079e4850c23c7cdffcf93a4084288f2dc035e787b7bcc10a3d44cb2ead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for mypy8tml 0.2.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.