Skip to main content

MinIO Python SDK for Amazon S3 Compatible Cloud Storage

Project description

MinIO Python SDK for Amazon S3 Compatible Cloud Storage Slack

MinIO Python SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service.

For a complete list of APIs and examples, please take a look at the Python Client API Reference

Minimum Requirements

Python 3.7 or higher.

Download using pip

pip3 install minio

Download source

git clone
cd minio-py
python install

Quick Start Example - File Uploader

This example program connects to an S3-compatible object storage server, make a bucket on that server, and upload a file to the bucket.

You need the following items to connect to an S3-compatible object storage server:

Parameters Description
Endpoint URL to S3 service.
Access Key Access key (aka user ID) of an account in the S3 service.
Secret Key Secret key (aka password) of an account in the S3 service.

This example uses MinIO server playground Feel free to use this service for test and development.

from minio import Minio
from minio.error import S3Error

def main():
    # Create a client with the MinIO server playground, its access key
    # and secret key.
    client = Minio(

    # Make 'asiatrip' bucket if not exist.
    found = client.bucket_exists("asiatrip")
    if not found:
        print("Bucket 'asiatrip' already exists")

    # Upload '/home/user/Photos/' as object name
    # '' to bucket 'asiatrip'.
        "asiatrip", "", "/home/user/Photos/",
        "'/home/user/Photos/' is successfully uploaded as "
        "object '' to bucket 'asiatrip'."

if __name__ == "__main__":
    except S3Error as exc:
        print("error occurred.", exc)

Run File Uploader

$ python
'/home/user/Photos/' is successfully uploaded as object '' to bucket 'asiatrip'.

$ mc ls play/asiatrip/
[2016-06-02 18:10:29 PDT]  82KiB

More References

Explore Further


Please refer Contributors Guide


Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minio-7.1.17.tar.gz (120.5 kB view hashes)

Uploaded source

Built Distribution

minio-7.1.17-py3-none-any.whl (78.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page