The recommended technique for installing this package is through pip.
$ pip install minio
#!/usr/bin/env python
from minio import Minio
# Instantiate a client
client = Minio('s3.amazonaws.com',
access_key='access_key',
secret_key='secret_key')
# List buckets
buckets = client.list_buckets()
for bucket in buckets:
print('bucket:', bucket.name, bucket.creation_date)
You can follow below mentioned steps for downloading minio-py from source.
$ sudo apt-get install git python-pip
$ sudo pip install virtualenv
$ cd my_project_folder
$ virtualenv --no-site-packages venv
$ source venv/bin/activate
$ git clone https://github.com/minio/minio-py
$ cd minio-py
$ python setup.py install
make_bucket(bucket, location, acl)
set_bucket_acl(bucket_name, acl=Acl.private())
list_incomplete_uploads(bucket_name, prefix=None, recursive=False)
get_object(bucket_name, object_name)
get_partial_object(bucket_name, object_name, offset, length)
put_object(bucket_name, object_name, length, data, content_type='application/octet_stream')
list_objects(bucket_name, prefix=None, recursive=False)
stat_object(bucket_name, object_name)
remove_object(bucket_name, object_name)
remove_incomplete_upload(bucket_name, object_name)
presigned_get_object(bucket_name, object_name, expires=604800)
presigned_put_object(bucket_name, object_name, expires=604800)