You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

py-easy-html

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

py-easy-html

Generate HTML using python and also convert to PDF.

0.0.2
Source
pipPyPI
Maintainers
1

Easy HTML

Generate HTML using python and also convert to PDF.

Installation

pip install py-easy-html

Getting started

General usage

h1 = generate_tag('h1', body='This is a h1', class_name="your_class", id_name="your_id", self_closing=False)

Output

<h1 class="your_class" id="your_id">This is a h1</h1>

<!-- With self_closing=True -->
<h1 class="your_class" id="your_id" />

You can also do nested tags

h1 = generate_tag('h1', body=generate_tag('span', body='Span inside h1'))

Output

<h1>
  <span>Span inside h1</span>
</h1>

And also multiple nested tags

h1 = generate_tag(
        'h1',
        style={
          "display": "flex",
          "justify-content": "space-between",
          "align-items": "center",
        },
        body=[
            generate_tag('span', body='First Span'),
            generate_tag('span', body='Second'),
        ],
    )

Output

<h1 style="display: flex;justify-content: space-between;align-items: center;">
  <span>First Span</span>
  <span>Second</span>
</h1>

Keywords

HTML Generator

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.