Boto3 library
This guide is suited for developers and advanced users. Boto3 is a Python library which can be incorporated into your application.
Boto3 library is a Python Software Development Kit for S3 service. It allows developers to create, configure, and manage S3 services. The library provides a simple and intuitive interface for interacting with CESNET S3 resources.
Installation of Boto3
In order to use boto3
library, you need to install it first. You can do it by running the following command inside your Python environment:
Issues with uploads within the latest boto3 versions
There have been some issues lately with the latest releases of the boto3
library and third-party S3 storage providers (like the CESNET S3 storage).
As of now, the issues still persist with versions 1.36.x
(1.36.12
to be exact). For this reason, we recommend using the boto3
library with the version 1.35.99
or lower.
For further information, see 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 with 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.
Then you can use the s3
object to interact with the S3 storage. Below you can find several examples of usage 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