Package: ak-minio
MinIO Python Library for Amazon S3 Compatible Cloud StorageThe 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 thePython Client API Referencedocumentation.This document assumes that you have a workingPythonsetup in place.Minimum RequirementsPython 2.7 or higherDownload from pippipinstallminioDownload from pip3pip3installminioDownload from sourcegitclonehttps://github.com/minio/minio-pycdminio-py
pythonsetup.pyinstallInitialize MinIO ClientYou need four items in order to connect to MinIO object storage server.ParamsDescriptionendpointURL to object storage service.access_keyAccess key is like user ID that uniquely identifies your account.secret_keySecret key is the password to your account.secureSet this value to 'True' to enable secure (HTTPS) access.fromminioimportMiniofromminio.errorimportResponseErrorminioClient=Minio('play.min.io',access_key='Q3AM3UQ867SPQQA43P2F',secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',secure=True)Quick Start Example - File UploaderThis 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 athttps://play.min.ioin 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.fromminioimportMiniofromminio.errorimport(ResponseError,BucketAlreadyOwnedByYou,BucketAlreadyExists)# Initialize minioClient with an endpoint and access/secret keys.minioClient=Minio('play.min.io',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")exceptBucketAlreadyOwnedByYouaserr:passexceptBucketAlreadyExistsaserr:passexceptResponseErroraserr:raise# Put an object 'pumaserver_debug.log' with contents from 'pumaserver_debug.log'.try:minioClient.fput_object('maylogs','pumaserver_debug.log','/tmp/pumaserver_debug.log')exceptResponseErroraserr:print(err)Run file-uploaderpythonfile_uploader.py

mclsplay/maylogs/[2016-05-2716:41:37PDT]12MiBpumaserver_debug.logAPI ReferenceThe full API Reference is available here.Complete API ReferenceAPI Reference : Bucket Operationsmake_bucketlist_bucketsbucket_existsremove_bucketlist_objectslist_objects_v2list_incomplete_uploadsAPI Reference : Bucket policy Operationsget_bucket_policyset_bucket_policyAPI Reference : Bucket notification Operationsset_bucket_notificationget_bucket_notificationremove_all_bucket_notificationlisten_bucket_notificationAPI Reference : File Object Operationsfput_objectfget_objectAPI Reference : Object Operationsget_objectput_objectstat_objectcopy_objectget_partial_objectremove_objectremove_objectsremove_incomplete_uploadAPI Reference : Presigned Operationspresigned_get_objectpresigned_put_objectpresigned_post_policyFull ExamplesFull Examples : Bucket Operationsmake_bucket.pylist_buckets.pybucket_exists.pylist_objects.pyremove_bucket.pylist_incomplete_uploads.pyFull Examples : Bucket policy Operationsset_bucket_policy.pyget_bucket_policy.pyFull Examples: Bucket notification Operationsset_bucket_notification.pyget_bucket_notification.pyremove_all_bucket_notification.pylisten_bucket_notification.pyFull Examples : File Object Operationsfput_object.pyfget_object.pyFull Examples : Object Operationsget_object.pyput_object.pystat_object.pycopy_object.pyget_partial_object.pyremove_object.pyremove_objects.pyremove_incomplete_upload.pyFull Examples : Presigned Operationspresigned_get_object.pypresigned_put_object.pypresigned_post_policy.pyExplore FurtherComplete DocumentationMinIO Python SDK API ReferenceContributeContributors Guide