Boto3 Library
This guide is intended for developers and advanced users. Boto3 is a Python library that can be integrated into your application.
The Boto3 library is a Python Software Development Kit for the S3 service. It enables developers to create, configure, and manage S3 services. The library offers a simple and intuitive interface for interacting with CESNET S3 resources.
Installation of Boto3
To use the boto3
library, you must first install it. You can do so by running the following command in your Python environment:
Issues with uploads in the latest boto3 versions
Recent releases of the boto3
library have encountered issues with third-party S3 storage providers (such as the CESNET S3 storage).
These issues are still present in versions 1.36.x
(specifically 1.36.12
). Therefore, we recommend using boto3
version 1.35.99
or earlier.
For more details, refer to this GitHub issue.
Or you can use the specific version of the library:
Usage
First, you need to create an instance of the s3 client
object using your credentials and the endpoint URL:
You can use the ~/.aws/credentials
file to store your credentials and use them in your scripts.
For more information, see the official boto3 documentation.
You can then use the s3
object to interact with the S3 storage. Below are several examples of how to use the Boto3 library.
List all the buckets
Upload an object
Download an object (be aware of the parameters order!)
Listing the objects within bucket
or alternatively,
Last updated on