Minio Python Library for Amazon S3 Compatible Cloud Storage
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.
Download from pip
$ pip install minio
Download from source
$ git clone https://github.com/minio/minio-py
$ cd minio-py
$ python setup.py 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('play.minio.io:9000',
access_key='Q3AM3UQ867SPQQA43P2F',
secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
secure=True)
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 https://play.minio.io:9000 in this example. Feel free to use this service for testing and development. Access credentials shown in this example are open to the public.
file-uploader.py
# Import Minio library.
from minio import Minio
from minio.error import ResponseError
# Initialize minioClient with an endpoint and access/secret keys.
minioClient = Minio('play.minio.io:9000',
access_key='Q3AM3UQ867SPQQA43P2F',
secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
secure=True)
# Make a bucket with the make_bucket API call.
try:
minioClient.make_bucket("maylogs", location="us-east-1")
except ResponseError as err:
print(err)
else:
# Put an object 'pumaserver_debug.log' with contents from 'pumaserver_debug.log'.
try:
minioClient.fput_object('maylogs', 'pumaserver_debug.log', '/tmp/pumaserver_debug.log')
except ResponseError as error:
print(error)
Run file-uploader
$ python file_uploader.py
$ mc ls play/maylogs/
[2016-05-27 16:41:37 PDT] 12MiB pumaserver_debug.log
API Reference
The full API Reference is available here. Complete API Reference
API Reference : Bucket Operations
API Reference : File Object Operations
API Reference : Object Operations
API Reference : Presigned Operations
Full Examples
Full Examples : Bucket Operations
Full Examples : File Object Operations
Full Examples : Object Operations
Full Examples : Presigned Operations
Explore Further
Contribute
Metadata
Release files for minio 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minio-2.0.0.tar.gz | 27.7 kB | Without provenance | Details for minio-2.0.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minio-2.0.0.linux-x86_64.tar.gz | Details for minio-2.0.0.linux-x86_64.tar.gz | |||
| minio-2.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for minio-2.0.0-py2.py3-none-any.whl |
Total release size: 157.7 kB
Release files / minio-2.0.0.tar.gz
| Download URL | minio-2.0.0.tar.gz |
|---|---|
| Size | 27.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
786243ebb96564eb2e4af9d0f2787cce76b5289bb53192289a846903a07b8e94
|
|
BLAKE2b-256 checksum How to use checksums |
45f17973b7048c60b467131b9f8a679cd812251d200e492d6e8f6eb09542820b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / minio-2.0.0.linux-x86_64.tar.gz
| Download URL | minio-2.0.0.linux-x86_64.tar.gz |
|---|---|
| Size | 80.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58dd2b26caabc4667e29d546bc60dff4e65b37a800b447b2e542ca1e22c68ada
|
|
BLAKE2b-256 checksum How to use checksums |
061918abfef2825577a18c3e1af235cb5f966b77f56a5979d78a47caa4eea801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / minio-2.0.0-py2.py3-none-any.whl
| Download URL | minio-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 49.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
38dc609572d127ed3bb579497554ea27942555e6934f27241fa175eff0ecb7aa
|
|
BLAKE2b-256 checksum How to use checksums |
bb28937a8d3855ae4d63d21ea4805dfdd331c81d1f969448f5dd882a18317d59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for minio 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.