You are on page 1of 17

GETTING TO KNOW YOUR

A P P L I C AT I O N S TA C K

CREATING MINDS
THE BASICS
• What is a Web Server?
A web server is a software program that delivers web content to clients over
the Internet or other networks. It is responsible for receiving and processing
HTTP requests from clients (such as web browsers), and sending back the
corresponding HTTP responses along with the requested content (such as
HTML pages, images, videos, etc.).

Some popular web servers include Apache HTTP Server, Nginx,


and Microsoft IIS.
WEB SERVER
Web servers are an essential component of the web infrastructure and play a
crucial role in the functioning of the World Wide Web. They serve as a bridge
between the client and the web application, receiving and processing requests,
and returning the appropriate responses.

• In this project on deployment we will launch a http server. Gunicorn (short


for Green Unicorn) is a Python Web Server Gateway Interface (WSGI) HTTP
server that will be used
• When building a web application in Python, the most common web server
used is a WSGI-compatible web server.
WEB FRAMEWORK

A Web Application Framework or a simply a Web Framework represents a


collection of libraries and modules that enable web application developers to
write applications without worrying about low-level details such as protocol,
thread management, and so on.

The One used here : flask 2.1.3


• Link
– https://flask.palletsprojects.com/en/2.2.x/
• Flask is a lightweight Python web framework used for developing web applications.
It provides a simple and easy-to-extend architecture for building scalable,
maintainable and secure web applications.
• It was developed by Armin Ronacher, who led a team of international Python
enthusiasts called Poocco.
• Flask depends on the Jinja template engine and the Werkzeug WSGI toolkit. The
documentation for these libraries can be found at:
– Jinja documentation
– Werkzeug documentation
JARGONS DEMYSTIFIED
• WSGI
– The Web Server Gateway Interface (Web Server Gateway Interface,
WSGI) is the specification of a common interface between web
servers and web applications.
• Werkzeug
– Werkzeug is a WSGI toolkit that implements requests, response
objects, and utility functions. This enables a web frame to be built on
it.
JINJA2
jinja2 is a popular template engine for Python. A web template system combines a
template with a specific data source to render a dynamic web page.

This allows you to pass Python variables into HTML templates like this:

<html>
<head>
<title>{{ title }}</title>
</head>
<body>
<h1>Hello {{ username }}</h1>
</body>
</html>
API-APPLICATION PROGRAMMING INTERFACE

– An API is a set of rules that specifies how two software programs can
interact with each other.
– defines a set of endpoints that allow client applications to access a web-
based service or database
– can be accessed over the internet using standard HTTP requests (such as
GET, POST, and DELETE)
– typically return data in a machine-readable format such as JSON or
XML.
REST API (REPRESENTATIONAL STATE TRANSFER)

– REST API is a software architectural style used for building web services.
– It is based on a client-server model and uses HTTP requests to POST (create),
PUT (update), GET (read), and DELETE (delete) data.
– REST is a lightweight, flexible and scalable alternative to more heavyweight
protocols like SOAP (Simple Object Access Protocol).
– REST APIs are widely used for building modern web and mobile applications.

(Web services are software applications that use standardized protocols, such as
HTTP, to exchange data over the internet. Two types – SOAP and RESTful) )
FLASK-SMOREST
• Flask-Smorest is a Flask extension that provides a simple and easy-to-use
framework for building REST APIs.
• Flask-Smorest also provides a number of features like
– request and response handling
– input validation
– automatic documentation generation
FLASK-JWT
• Flask-JWT is a Flask extension that provides an easy-to-use
authentication library for securing Flask-based web applications.
• It implements JSON Web Tokens (JWT), an open standard for
secure communication between parties.
• Flask-JWT can be used with any RESTful API built with Flask, and
it supports token-based authentication, which eliminates the need to
store user credentials on the server
• With Flask-JWT, you can add authentication to your Flask
application by adding a few lines of code.
SQLALCHEMY - OBJECT RELATIONAL
MAPPER (ORM)
• SQLAlchemy is a Python library for interacting with relational databases.
• allows you to interact with databases in a more Pythonic way, without
having to write raw SQL statements.
• provides a high-level API for working with databases, including SQLite,
MySQL, and PostgreSQL.
• allows you to define your own classes and tables, as well as map your
classes to existing tables.
• provides a full suite of tools for working with schema and data migrations,
making it easier to evolve your database as your application changes.
Web Server

Web Framework

API- REST
SUMMARY
TO
REMEMBER
JWT – JSON Web Tokens

ORM
IN YOUR SPARE TIME

• Don’t rest – Read about REST


• JSON
• JSON Web Tokens and fundamentals
• Object Relational Mapper (ORM)
• Assignments
– One
– Two
– Three
• Goal #1
GOALS • Goal #2
• Goal #3
W H AT Q U E S T I O N S
WOULD YOU LIKE
TO ASK ME?
SLIDE TITE
LET’S GET THE PROJECT LIVE
SOON!!

You might also like