Answers for "minIO python"

0

minIO python

# pip3 install minio
from minio import Minio
from minio.error import S3Error


def main():
    client = Minio(
        "host:9000",
        access_key="username",
        secret_key="password",
        secure=False
    )

    # Make the test bucket named 'testbucket'
    client.make_bucket("testbucket")


if __name__ == "__main__":
    try:
        main()
    except S3Error as exc:
        print("error occurred.", exc)
Posted by: Guest on May-14-2021

Python Answers by Framework

Browse Popular Code Answers by Language