Skip to main content

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>

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

amantadine-0.0.3.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

amantadine-0.0.3-py3.8.egg (11.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page