Skip to main content
Practice

Frequently Used External Packages in Python

An external package refers to a library developed externally to enhance programming convenience.

You can install external packages using Python's own package management system, pip.

Installing External Packages with pip
$ pip install requests # Install the requests package for making network requests

Frequently Used External Packages

  1. requests

    • A library for making HTTP requests. It is often used for web scraping and API calls.
  2. numpy

    • A library for high-performance numerical computations. It efficiently handles multi-dimensional arrays and is widely used in scientific and engineering calculations.
  3. pandas

    • A library for data analysis and manipulation, offering a variety of functionalities to efficiently manage structured data. It makes it easy to handle various data formats with a focus on data frames (DataFrame).
  4. matplotlib

    • A library for creating 2D graphics and plots. It is mainly used for data visualization.
  5. scikit-learn

    • A library providing machine learning algorithms. It is used for tasks like classification, regression, and clustering.
  6. flask, django

    • Frameworks for developing web applications. Flask is suitable for simple and lightweight web app development, while Django is more powerful and feature-rich for robust web app development.
  7. Beautiful Soup

    • A library for extracting data from HTML and XML files, mainly used for web scraping.

External Package Usage Example

Example Using the requests Package
# Fetching the content of a web page using the requests package
import requests # Import the requests package

response = requests.get('https://example.com') # Send a request to the URL and receive a response
print(response.text) # Print the response content

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.