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

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.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

amantadine-0.0.2-py3.8.egg (11.3 kB view details)

Uploaded Source

File details

Details for the file amantadine-0.0.2.tar.gz.

File metadata

  • Download URL: amantadine-0.0.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.9

File hashes

Hashes for amantadine-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1154f90fa1afbfa3d81fdae5a0afe3eca08525d489bc619eb692bcbb6cbadbf0
MD5 a521d0e3c410061052ebf2bb0099f5c1
BLAKE2b-256 cdf5e3e616361b554ef3ddc812cbe4d2b68fec996fb72b8197e4dfd67e2af60d

See more details on using hashes here.

File details

Details for the file amantadine-0.0.2-py3.8.egg.

File metadata

  • Download URL: amantadine-0.0.2-py3.8.egg
  • Upload date:
  • Size: 11.3 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

Hashes for amantadine-0.0.2-py3.8.egg
Algorithm Hash digest
SHA256 40d3b7c8604f30a9959fd442d74f0d2521ecb199fa2bd0692738f91796832042
MD5 295352ad6211469f13d063bbb6b0e454
BLAKE2b-256 59e766ad628da7b71591e35afff5a35e08e9837dbe9c1fb63d519683af8d3209

See more details on using hashes here.

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