minio 7.2.18


pip install minio

  Latest version

Released: Sep 29, 2025

Project Links

Meta
Author: MinIO, Inc.
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

License
  • OSI Approved :: Apache Software License

Natural Language
  • English

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Software Development :: Libraries :: Python Modules

MinIO Python Client SDK for Amazon S3 Compatible Cloud Storage Slack Apache V2 License

The MinIO Python Client SDK provides high level APIs to access any MinIO Object Storage or other Amazon S3 compatible service.

This Quickstart Guide covers how to install the MinIO client SDK, connect to the object storage service, and create a sample file uploader.

The example below uses:

The play server is a public MinIO cluster located at https://play.min.io. This cluster runs the latest stable version of MinIO and may be used for testing and development. The access credentials in the example are open to the public and all data uploaded to play should be considered public and world-readable.

For a complete list of APIs and examples, see the Python Client API Reference

Install the MinIO Python SDK

The Python SDK requires Python version 3.7+. You can install the SDK with pip or from the minio/minio-py GitHub repository:

Using pip

pip3 install minio

Using Source From GitHub

git clone https://github.com/minio/minio-py
cd minio-py
python setup.py install

Create a MinIO Client

To connect to the target service, create a MinIO client using the Minio() method with the following required parameters:

Parameter Description
endpoint URL of the target service.
access_key Access key (user ID) of a user account in the service.
secret_key Secret key (password) for the user account.

For example:

from minio import Minio

client = Minio("play.min.io",
    access_key="Q3AM3UQ867SPQQA43P2F",
    secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
)

Example - File Uploader

This example does the following:

  • Connects to the MinIO play server using the provided credentials.
  • Creates a bucket named python-test-bucket if it does not already exist.
  • Uploads a file named test-file.txt from /tmp, renaming it my-test-file.txt.
  • Verifies the file was created using mc ls.

file_uploader.py

# file_uploader.py MinIO Python SDK example
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("play.min.io",
        access_key="Q3AM3UQ867SPQQA43P2F",
        secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
    )

    # The file to upload, change this path if needed
    source_file = "/tmp/test-file.txt"

    # The destination bucket and filename on the MinIO server
    bucket_name = "python-test-bucket"
    destination_file = "my-test-file.txt"
    
    # Make the bucket if it doesn't exist.
    found = client.bucket_exists(bucket_name)
    if not found:
        client.make_bucket(bucket_name)
        print("Created bucket", bucket_name)
    else:
        print("Bucket", bucket_name, "already exists")

    # Upload the file, renaming it in the process
    client.fput_object(
        bucket_name, destination_file, source_file,
    )
    print(
        source_file, "successfully uploaded as object",
        destination_file, "to bucket", bucket_name,
    )

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

To run this example:

  1. Create a file in /tmp named test-file.txt. To use a different path or filename, modify the value of source_file.

  2. Run file_uploader.py with the following command:

python file_uploader.py

If the bucket does not exist on the server, the output resembles the following:

Created bucket python-test-bucket
/tmp/test-file.txt successfully uploaded as object my-test-file.txt to bucket python-test-bucket
  1. Verify the uploaded file with mc ls:
mc ls play/python-test-bucket
[2023-11-03 22:18:54 UTC]  20KiB STANDARD my-test-file.txt

More References

Explore Further

Contribute

Contributors Guide

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE and NOTICE for more information.

PYPI

7.2.18 Sep 29, 2025
7.2.17 Sep 26, 2025
7.2.16 Jul 21, 2025
7.2.15 Jan 19, 2025
7.2.14 Jan 06, 2025
7.2.13 Dec 18, 2024
7.2.12 Nov 26, 2024
7.2.11 Nov 19, 2024
7.2.10 Oct 24, 2024
7.2.9 Sep 24, 2024
7.2.8 Aug 17, 2024
7.2.7 Apr 30, 2024
7.2.6 Apr 25, 2024
7.2.5 Mar 02, 2024
7.2.4 Feb 11, 2024
7.2.3 Jan 02, 2024
7.2.2 Dec 27, 2023
7.2.1 Dec 26, 2023
7.2.0 Nov 10, 2023
7.1.17 Sep 25, 2023
7.1.16 Aug 17, 2023
7.1.15 May 20, 2023
7.1.14 Mar 24, 2023
7.1.13 Jan 07, 2023
7.1.12 Sep 28, 2022
7.1.11 Jul 25, 2022
7.1.10 Jul 09, 2022
7.1.9 Jun 11, 2022
7.1.8 May 05, 2022
7.1.7 Apr 19, 2022
7.1.6 Apr 09, 2022
7.1.5 Mar 11, 2022
7.1.4 Feb 27, 2022
7.1.3 Feb 02, 2022
7.1.2 Nov 29, 2021
7.1.1 Oct 08, 2021
7.1.0 Jul 08, 2021
7.0.4 Jun 13, 2021
7.0.3 Apr 06, 2021
7.0.2 Feb 12, 2021
7.0.1 Jan 05, 2021
7.0.0 Dec 08, 2020
6.0.2 Nov 28, 2020
6.0.1 Nov 28, 2020
6.0.0 Aug 03, 2020
5.0.10 Apr 17, 2020
5.0.9 Apr 14, 2020
5.0.8 Mar 14, 2020
5.0.7 Jan 25, 2020
5.0.6 Dec 30, 2019
5.0.5 Nov 12, 2019
5.0.4 Oct 29, 2019
5.0.3 Oct 28, 2019
5.0.1 Sep 18, 2019
5.0.0 Sep 11, 2019
4.0.21 Aug 28, 2019
4.0.20 Aug 14, 2019
4.0.19 Aug 07, 2019
4.0.18 Jun 12, 2019
4.0.17 May 23, 2019
4.0.16 May 01, 2019
4.0.15 Apr 24, 2019
4.0.14 Apr 10, 2019
4.0.13 Mar 27, 2019
4.0.12 Mar 13, 2019
4.0.11 Jan 30, 2019
4.0.10 Jan 16, 2019
4.0.9 Jan 10, 2019
4.0.8 Dec 05, 2018
4.0.7 Nov 30, 2018
4.0.6 Oct 09, 2018
4.0.5 Sep 22, 2018
4.0.4 Sep 06, 2018
4.0.3 Aug 17, 2018
4.0.2 Jun 22, 2018
4.0.1 Jun 13, 2018
4.0.0 Apr 28, 2018
3.0.4 Mar 07, 2018
3.0.3 Feb 08, 2018
3.0.2 Jan 24, 2018
3.0.1 Jan 16, 2018
3.0.0 Nov 17, 2017
2.2.6 Oct 31, 2017
2.2.5 Sep 20, 2017
2.2.4 Jul 06, 2017
2.2.3 Jun 20, 2017
2.2.2 May 03, 2017
2.2.1 Feb 25, 2017
2.2.0 Feb 24, 2017
2.1.0 Feb 23, 2017
2.0.8 Feb 01, 2017
2.0.7 Jan 28, 2017
2.0.6 Jan 05, 2017
2.0.5 Dec 28, 2016
2.0.4 Dec 09, 2016
2.0.3 Nov 22, 2016
2.0.2 Oct 09, 2016
2.0.1 Sep 16, 2016
2.0.0 Jun 29, 2016
1.0.2 May 16, 2016
1.0.1 Mar 23, 2016
1.0.0 Feb 18, 2016
0.2.9 Nov 26, 2015
0.2.8 Nov 25, 2015
0.2.6 Aug 18, 2015
0.2.5 Aug 11, 2015
0.2.4 Aug 04, 2015
0.2.3 Aug 04, 2015
0.2.2 Jul 23, 2015
0.2.1 Jul 17, 2015
2.2.6.linux Oct 31, 2017
2.2.5.linux Sep 20, 2017
2.2.4.linux Jul 06, 2017
2.2.3.linux Jun 20, 2017
2.2.2.linux May 03, 2017
2.2.1.linux Feb 25, 2017
2.2.0.linux Feb 24, 2017
2.1.0.linux Feb 23, 2017
2.0.8.linux Feb 01, 2017
2.0.7.linux Jan 28, 2017
2.0.6.linux Jan 05, 2017
2.0.5.linux Dec 28, 2016
2.0.4.linux Dec 09, 2016
2.0.3.linux Nov 22, 2016
2.0.2.linux Oct 09, 2016
2.0.1.linux Sep 16, 2016
2.0.0.linux Jun 29, 2016
1.0.2.macosx May 16, 2016
1.0.1.macosx Mar 23, 2016
1.0.0.macosx Feb 18, 2016
0.2.9.macosx Nov 26, 2015
0.2.8.linux Nov 25, 2015
0.2.6.linux Aug 18, 2015
0.2.5.linux Aug 11, 2015
0.2.4.linux Aug 04, 2015
0.2.3.linux Aug 04, 2015
0.2.2.linux Jul 23, 2015
0.2.1.linux Jul 17, 2015

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
argon2-cffi
certifi
pycryptodome
typing-extensions
urllib3