Skip to main content

HTMLTemplateRender

  • Rendering html file with variables into text

Installation

  • Install Package Using pip
    python3 pip install HTMLTemplateRender
    

How to use:

  • HTML File (test.html) Use {{ variable }} to assign value

     <!DOCTYPE html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <title>Test</title>
     </head>
     <body>
         <h1>Hey there {{ username }}</h1>
         <h2>It's {{ day_name }}</h2>
     </body>
     </html>
    
    • Lets Render the file
    from HTMLTemplateRender.renderer import render_template
    
    context = {
        'username': 'Anonymous',
        'day_name': 'Sunday'
    }
    
    result = render_template(template_path='test.html', context=context)
    print(result)
    
  • Output

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Test</title>
    </head>
    <body>
        <h1>Hey there Anonymous</h1>
        <h2>It's Sunday</h2>
    </body>
    </html>
    
    Process finished with exit code 0
    

Metadata

Release files for HTMLTemplateRender 1.0.1

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

Source distribution (sdist)

Source distribution for HTMLTemplateRender 1.0.1
File Size Uploaded Provenance Actions
HTMLTemplateRender-1.0.1.tar.gz 2.7 kB Without provenance Details for HTMLTemplateRender-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for HTMLTemplateRender 1.0.1
File Interpreter ABI Platform Actions
HTMLTemplateRender-1.0.1-py3-none-any.whl Python 3 none any Details for HTMLTemplateRender-1.0.1-py3-none-any.whl

Total release size: 5.6 kB

Release files / HTMLTemplateRender-1.0.1.tar.gz

Download URL HTMLTemplateRender-1.0.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
81c0ae6f9af11eb71d9dfcfff2d6c9b950a524e658248af0a587a32ba76f7fcb
BLAKE2b-256 checksum
How to use checksums
8de2d1c1752c50710c8428ef524c48c86accb48d09f5f17bec2d3aa65d335f53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / HTMLTemplateRender-1.0.1-py3-none-any.whl

Download URL HTMLTemplateRender-1.0.1-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e28b8c4bf4fd914da8ca955bafce10c4d5fa2f7eae961390fb7f5cf482099c2
BLAKE2b-256 checksum
How to use checksums
5ffb88e9ef88ce917e6c699ac83be60662410390a1c5e94c13a6077e880ae468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Security for HTMLTemplateRender 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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