Amantadine is a framework for rendering HTML on the server
Project description
Amantadine
Amantadine is a framework for rendering HTML on the server
It is not ready for production.
Introduce
The heavy HTML, CSS and JS files are rendered into independent HTML files, and asynchronous data collection through network requests is supported, and functions are defined as parameters. Only render CSS tags used in HTML to reduce volume
Install
$ pip install -U amantadine
Usage
import amantadine
pages = amantadine.Pages(
body=[amantadine.Record("h1", [amantadine.OnlyText("Amantadine")])],
head=[
amantadine.Record("meta", attrs={"charset": "UTF-8"}),
amantadine.Record("title", [amantadine.OnlyText("Amantadine")]),
],
)
print(amantadine.renderDoc(pages))
After rendering:
<!DOCTYPE html>
<html lang="en">
<head>
<meta class='' charset=UTF-8></meta>
<title class=''>Amantadine</title>
</head>
<body>
<h1 class=''>Amantadine</h1>
</body>
</html>
Build
Not only that, you can also render large web projects. This reduces the redundancies of the top and bottom columns, which you can learn from the examples in the /example
folder in the directory
$ python main.py
🎍 Build Production .
All Chunk:
docs/index.html 50722B
License
MIT LICENSE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file amantadine-0.0.4.tar.gz
.
File metadata
- Download URL: amantadine-0.0.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5aeeac3f7105d64316750a8115d5500717e3d70eb0ad6cda7cf8c3055dc0bc3 |
|
MD5 | 7c763cc4b49b38e2ce4d0e8b403dddc3 |
|
BLAKE2b-256 | 565ee6211f9fe2e36a9467fb4902de89f82863fb03a9d414b8404bb984c82a5a |