0% found this document useful (0 votes)
0 views2 pages

Python Exp 6

The document outlines an experiment aimed at installing the Flask and requests packages using the Spyder software. It provides an introduction to both Flask, a lightweight web framework for Python, and the requests library, which simplifies HTTP requests. The experiment concludes with a successful installation of both packages, ensuring the necessary dependencies for web application development and HTTP requests in Python are met.

Uploaded by

tanwaramit295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

Python Exp 6

The document outlines an experiment aimed at installing the Flask and requests packages using the Spyder software. It provides an introduction to both Flask, a lightweight web framework for Python, and the requests library, which simplifies HTTP requests. The experiment concludes with a successful installation of both packages, ensuring the necessary dependencies for web application development and HTTP requests in Python are met.

Uploaded by

tanwaramit295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Experiment 6

Aim:Write a program to install package requests and flask.


Software Used:Spyder.
Theory:
Introduction to Flask:Flask is a lightweight and flexible web framework for Python that allows
developers to build web applications quickly and efficiently. It follows the WSGI (Web Server
Gateway Interface) standard and is based on Werkzeug and Jinja2. Flask is often preferred for its
simplicity, modular design, and minimal setup requirements, making it ideal for small to
medium-scale applications, RESTful APIs, and prototypes.

Introduction to Requests:The requests library is a powerful and widely used HTTP library for
Python. It simplifies sending HTTP/HTTPS requests to web servers, interacting with APIs, and
retrieving web data. Unlike Python’s built-in urllib, requests is more user-friendly and handles
many complexities such as session management, authentication, and JSON encoding/decoding
automatically.

Source Code :
1.For Flask:
C:\Users\T.O. Indora> pip install flask
2.For Request:
C:\Users\T.O. Indora> pip install requests
Output:
1.For Flask:
Collecting flask
Downloading Flask-2.2.2-py3-none-any.whl (95 kB)
|████████████████████████████████| 95 kB 1.2 MB/s eta 0:00:01
Collecting Werkzeug>=2.2.2
Downloading Werkzeug-2.2.2-py3-none-any.whl (232 kB)
|████████████████████████████████| 232 kB 1.3 MB/s eta 0:00:01
Collecting Jinja2>=3.0
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 1.1 MB/s eta 0:00:01
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.1.1-py3-none-any.whl (15 kB)
Collecting click>=8.0
Downloading click-8.1.3-py3-none-any.whl (98 kB)
|████████████████████████████████| 98 kB 1.3 MB/s eta 0:00:01
Installing collected packages: click, itsdangerous, Jinja2, Werkzeug, flask
Successfully installed Flask-2.2.2 Jinja2-3.1.2 Werkzeug-2.2.2 click-8.1.3 itsdangerous-2.1.1
2.For Request:
Collecting requests
Downloading requests-2.28.1-py2.py3-none-any.whl (62 kB)
|████████████████████████████████| 62 kB 1.2 MB/s eta 0:00:01
Installing collected packages: requests
Successfully installed requests-2.28.1
Conclusion: In this experiment, we successfully installed the requests and Flask packages using
pip. This ensures that the required dependencies are available for developing and running web
applications or making HTTP requests in Python.

You might also like