Skip to main content

MinIO Python Library for Amazon S3 Compatible Cloud Storage for Python

Project description

MinIO Python Library for Amazon S3 Compatible Cloud Storage Slack

The MinIO Python Client SDK provides simple APIs to access any Amazon S3 compatible object storage server.

This quickstart guide will show you how to install the client SDK and execute an example python program. For a complete list of APIs and examples, please take a look at the Python Client API Reference documentation.

This document assumes that you have a working Python setup in place.

Minimum Requirements

  • Python 2.7 or higher

Download from pip

pip install minio

Download from pip3

pip3 install minio

Download from source

git clone
cd minio-py
python install

Initialize MinIO Client

You need four items in order to connect to MinIO object storage server.

Params Description
endpoint URL to object storage service.
access_key Access key is like user ID that uniquely identifies your account.
secret_key Secret key is the password to your account.
secure Set this value to 'True' to enable secure (HTTPS) access.
from minio import Minio
from minio.error import ResponseError

minioClient = Minio('',

Quick Start Example - File Uploader

This example program connects to a MinIO object storage server, makes a bucket on the server and then uploads a file to the bucket.

We will use the MinIO server running at in this example. Feel free to use this service for testing and development. Access credentials shown in this example are open to the public.

# Import MinIO library.
from minio import Minio
from minio.error import (ResponseError, BucketAlreadyOwnedByYou,

# Initialize minioClient with an endpoint and access/secret keys.
minioClient = Minio('',

# Make a bucket with the make_bucket API call.
       minioClient.make_bucket("maylogs", location="us-east-1")
except BucketAlreadyOwnedByYou as err:
except BucketAlreadyExists as err:
except ResponseError as err:

# Put an object 'pumaserver_debug.log' with contents from 'pumaserver_debug.log'.
       minioClient.fput_object('maylogs', 'pumaserver_debug.log', '/tmp/pumaserver_debug.log')
except ResponseError as err:

Run file-uploader


mc ls play/maylogs/
[2016-05-27 16:41:37 PDT]  12MiB pumaserver_debug.log

API Reference

The full API Reference is available here.

API Reference : Bucket Operations

API Reference : Bucket policy Operations

API Reference : Bucket notification Operations

API Reference : File Object Operations

API Reference : Object Operations

API Reference : Presigned Operations

Full Examples

Full Examples : Bucket Operations

Full Examples : Bucket policy Operations

Full Examples: Bucket notification Operations

Full Examples : File Object Operations

Full Examples : Object Operations

Full Examples : Presigned Operations

Explore Further


Contributors Guide

PYPI Build Status Build status

Project details

Download files

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

Built Distribution

ak_minio-5.0.7.post2-py2.py3-none-any.whl (71.6 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page