New Package In Python to Automate HTML
Package which allows users to generate html code using python
If you are a frontend developer and you want to write plain html you find that you are repeating yourself so you will use a framework like react or angular. What if you want to write plain html, didn't want to complicate things?
Then you can use this new library in python known as htmlwithpython. If you know python then you can automate writing repetitive html code using this package.
What exactly does it do ?
This package itself doesn't build frontend but it can give you repetative html,css code as output.
Contribute
This package is implemented from scratch using python without any external libraries. So if you want to contribute you can raise a issue in the Github Repo. Only things you need to know to contribute are : Knowledge in OOP, python.
Some features of this package
import htmlwithpy as hwp
inp = hwp.Input(className="form",styleSheet = True)
inp.add_css("height","100px")
inp.add_css("width","100px")
inp.add_placeholder("placeholder")
inp.generate()
Output :
. form {
height : 100px ;
width : 100px ;
}
<input class = "form" placeholder = "placeholder">
import htmlwithpy as hwp
body = hwp.Body()
body.add_css("height","100px")
body.add_css("width","100px")
body.add_content("Test Content")
body.generate()
Output :
<body style= " height :100px; width :100px; ">
Test Content
</body>
Installation
Use the package manager pip to install htmlwithpy.\
pip install htmlwithpy
To know more about this package visit htmlwithpy
Features that you can expect
- Generate multiple files for HTML, CSS
- Nested HTML tags