minio python

Solutions on MaxInterview for minio python by the best coders in the world

showing results for - "minio python"
Gael
11 Jun 2016
1# pip3 install minio
2from minio import Minio
3from minio.error import S3Error
4
5
6def main():
7    client = Minio(
8        "host:9000",
9        access_key="username",
10        secret_key="password",
11        secure=False
12    )
13
14    # Make the test bucket named 'testbucket'
15    client.make_bucket("testbucket")
16
17
18if __name__ == "__main__":
19    try:
20        main()
21    except S3Error as exc:
22        print("error occurred.", exc)