Skip to main content

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

Metadata

Release files for amantadine 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amantadine 0.0.4
File Size Uploaded
amantadine-0.0.4.tar.gz 3.8 kB Details

Release files / amantadine-0.0.4.tar.gz

Download URL amantadine-0.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b5aeeac3f7105d64316750a8115d5500717e3d70eb0ad6cda7cf8c3055dc0bc3
BLAKE2b-256 checksum
How to use checksums
565ee6211f9fe2e36a9467fb4902de89f82863fb03a9d414b8404bb984c82a5a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page