The Top 5 Python Packages and What They Do
This look at the most downloaded Python packages shows Amazon's dominance in the PyPI ecosystem.
Oct 24th, 2024 5:00am by
Featured image via Unsplash.
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:
pip install boto3
- 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.
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:
python -m pip install urllib3
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:
python -m pip install requests
YOUTUBE.COM/THENEWSTACK
Tech moves fast, don't miss an episode. Subscribe to our YouTube
channel to stream all our podcasts, interviews, demos, and more.