sierra
A lightweight Python framework for building and Integrating Web Applications. Sierra is a Python3 library for building and integrating web applications with HTML and CSS using simple enough syntax. You can develop your web applications with Python, taking advantage of its functionalities and integrating them to the fullest.
v1.2.3 is out
Use pip install --upgrade sierra
to upgrade
Documentation
Check out the Official documentation of Sierra
Check out a comprehensive example of its use
Installation
Method 1: pip install
type the below command in terminal:
pip install sierra
Method 2: Download ZIP file
To download the zip file: click on the download
button and then click on the Download ZIP
button. The zip file will get downloaded in the downloads folder.
To unzip the zip file: open the zipped folder, then drag the file or folder from the zipped folder to a new location. To unzip all the contents of the zipped folder, press and hold (or right-click) the folder, select Extract All
. Development can be done in sierra-main/sierra
and not in sierra-main/``src/sierra
Check out doc.py for a better view on how to start off
Method 3: Clone repository
To clone the repository, type:
gh repo clone BrainStormYourWayIn/sierra
or git clone https://github.com/BrainStormYourWayIn/sierra.git
in your terminal/shell.
Use pip install --upgrade sierra
to upgrade the library
Sierra
from sierra import *
title('This is how you enter the title of your web application')
head('I love Sierra!', type='h1', color='rgb(31, 48, 92)')
openBody(background_color='green', opacity=0.8)
a = tTags(div_class='newClass')
b = tTags(p=True)
a.start_div()
b.css(font_family='Times New Roman', color='purple')
b.start_p('This is a paragraph under div "newClass!" CSS can be added with .css!', close=True)
closeTags('div')
abc = 'stuff!'
c = ['This', 'is', 'easy', abc]
addBullets(points=c, ul=False, type='i')
openTags('XMLTag')
b.start_p('This is an XML tag', True)
writeCSS('XMLTag', {"font-size": "15px", "background-color": "rgb(240, 237, 228)"})
b.start_p('You can enter custom CSS styling arguments like this, or use cTags() to make it easy!', True)
closeTags('XMLTag')
autoPrettify()
Outputs in index.html and style.css:
I love Sierra!
This is a paragraph under div "newClass!" CSS can be added with .css!
- This
- is
- easy
- stuff!
This is an XML tag
You can enter custom CSS styling arguments like this, or use cTags() to make it easy!