Member-only story

A new python web framework you need to use

Manpreet Singh
3 min readJun 23, 2021

--

Welcome back! As some of you may know, there are tons of web frameworks available with Python, but there seems to be a new one that you should be aware of, this specific one is called Sierra! This specific framework is characterized as a lightweight framework used for building and integrating web applications with HTML and CSS, if you want to jump straight to their GitHub page check out the link below:

You can also view their entire documentation below:

Starting off, to install this specific package we use the following pip command:

pip install sierra

At this point you’re ready to start using this framework! Their GitHub page does a great job breaking down exactly what this package is capable of, let’s take a look at the example below:

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()

The output of this for the index.html and style.css files are the following:

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8"/>
<head>
<title> This is

--

--

Manpreet Singh
Manpreet Singh

No responses yet

Write a response