init package and add first subpackages

This commit is contained in:
Markus Clauß
2023-02-27 17:07:04 +01:00
commit 1b4ce18eca
16 changed files with 1658 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import os
from minio import Minio
def get_minio_client_processing(bucket_name = 'processing'):
client = Minio(
os.environ["MINIO_URL"],
access_key=os.environ["MINIO_ACCESS_KEY"],
secret_key=os.environ["MINIO_SECRET_KEY"],
secure=False
)
found = client.bucket_exists(bucket_name)
if not found:
client.make_bucket(bucket_name)
else:
pass
return client
def get_minio_client_archive(bucket_name = 'archive'):
client = Minio(
os.environ["MINIO_ARCHIVE_URL"],
access_key=os.environ["MINIO_ARCHIVE_ACCESS_KEY"],
secret_key=os.environ["MINIO_ARCHIVE_SECRET_KEY"],
secure=False
)
found = client.bucket_exists(bucket_name)
if not found:
client.make_bucket(bucket_name)
else:
pass
return client