The Top 5 Python Packages and What They Do

Have you ever wondered what the top five Python packages are? If so, you might be surprised as to what you might find. It would be easy to think NumPy or Pandas might land at the top, but that’s not always the case. In fact, as of this writing (according to PyPI stats), NumPy currently sits at number 17, and Pandas is not even in the top 20.
Of course, that could change any day, and you could wind up seeing a completely different package on top.
Before I get any deeper into this, you might want to know that PyPI is the Python Package Index and serves as a repository for the Python programming language. As of now, there are 578,303 packages that can be installed from the PyPI repository, 6,203,916 releases, 12,339,784 files, and 867,172 users.
The packages found within PyPI are installed using Python Package Manager, pip. In other words, if you’ve ever installed a Python package with pip, that package was pulled from PyPI. From PyPI, you’ll find a vast number of packages that do different things, from machine learning to big data, artificial intelligence, and so much more.
But what are the top five packages found in PyPI and what do they do?
Let’s dive in and take a look.
Boto3
The boto3 (pronounced bo-toh) package is the official Amazon Web Services (AWS) SDK for Python that allows developers to create software that can interact and use services hosted by Amazon, such as Amazon S3, Amazon EC2, and more. Named after the freshwater dolphin that is native to the Amazon River, boto3 is published and maintained by Amazon Web Services. With boto3, you can directly create, update, and delete AWS resources from your Python scripts. Think of boto3 as a bridge between your Python applications and the various AWS services. The benefits of using boto3 include simplified API interactions, comprehensive service coverage, flexibility and extensibility, integration with other Python libraries, and an active community of developers.
Boto3 can be installed with pip using the command:
1 |
pip install boto3 |
Once installed, you have to set up the necessary environment variables for authentication, which look something like this:
- AWS_ACCESS_KEY_ID – the access key ID for the IAM user.
- AWS_SECRET_ACCESS_KEY – the secret access key corresponding to the access key ID.
Those variables need to be set with the appropriate method for whatever OS you use (such as .bash_profile in Linux).
urllib3
urllib3 is a user-friendly HTTP client for Python that brings several critical features that are missing from the standard libraries. Those features include thread safety, connection pooling, client-side SSL/TLS verification, file uploads (with multipart encoding), helpers for retrying requests and dealing with HTTP redirects, support for gzip, deflate, brotli, and zstd encoding, proxy support for both HTTP and SOCKS, and 100% test coverage.
urllib3 can be installed with pip, like so:
1 |
python -m pip install urllib3 |
You’ll then need to use the import urllib3 statement in your Python scripts.
Botocore
Botocore is the low-level interface for an ever-growing number of Amazon Web Services and serves as the foundation for the AWS-CLI (command line interface) tools. Botocore plays a key role in boto3.x and is responsible for providing access to all available services, provides access to all operations within a service, marshals all parameters for a particular operation in the correct format, signs requests with the correct authentication signature and receives the response and returns the date in native Python data structures. This package is primarily data-driven and each service uses a JSON description to specify all operations of the service, all parameters the operation can accept, all documentation related to the service, information about supported AWS regions, and more.
You can install botocore with the following commands:
aiobotocore
AWS services claim the top three spots, and the third belongs to aiobotocore, the async client for AWS services using botocore and aiohttp (the async HTTP client/server framework). The currently supported AWS services include S3, DynamoDB, SNS, SQS, CloudFormation, and Kinesis. To this date, only S3 functionality is listed as working, whereas the others are listed as “Basic methods tested.” Think of aiobotocore as the fully featured asynchronous version of botocore.
To install aiobotocore, follow these steps:
Where XXX is your secret access key and YYY is your default region.
Requests
Requests is a simple HTTP library for Python that allows you to send HTTP/1.1 requests with ease. Using Requests means there’s no need to manually add query strings to URLs or even form-encode your POST data. Features found in requests include keep-alive and connection pooling, international domains and URLs, Sessions with cookie persistence, Browser-style SSL verification, basic/digest authentication, key/value cookies, auto decompression, unicode response bodies, HTTPS proxy support, multipart file uploads, streaming downloads, connection timeouts, chunked requests, and .netrc support.
You can install requests with the command:
1 |
python -m pip install requests |
And there you have it, the top 5 Python packages listed with PyPI. Remember, those could change any day but it’s safe to assume the Amazon AWS packages will remain up top for some time. Keep checking back to the PyPI repository to see what packages have moved in or out of the top 20.