Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.minio.minio_helper Namespace Reference

Classes

class  MinioEventStreamIterator
 
class  MinioEventThread
 

Functions

Minio create_minio_client (str endpoint, str access_key, str secret_key, bool secure)
 
def get_minio_notification_response (minio_client, str bucket_name, str prefix, str suffix, list[str] events)
 
def iterate_objects (event)
 
dict normalize_metadata (dict metadata)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 _METADATA_RE = re.compile("x-amz-meta-(.*)", re.IGNORECASE)
 

Detailed Description

Minio helper methods.

Function Documentation

◆ create_minio_client()

Minio homeassistant.components.minio.minio_helper.create_minio_client ( str  endpoint,
str  access_key,
str  secret_key,
bool   secure 
)
Create Minio client.

Definition at line 35 of file minio_helper.py.

◆ get_minio_notification_response()

def homeassistant.components.minio.minio_helper.get_minio_notification_response (   minio_client,
str  bucket_name,
str  prefix,
str  suffix,
list[str]   events 
)
Start listening to minio events. Copied from minio-py.

Definition at line 44 of file minio_helper.py.

◆ iterate_objects()

def homeassistant.components.minio.minio_helper.iterate_objects (   event)
Iterate over file records of notification event.

Most of the time it should still be only one record.

Definition at line 189 of file minio_helper.py.

◆ normalize_metadata()

dict homeassistant.components.minio.minio_helper.normalize_metadata ( dict  metadata)
Normalize object metadata by stripping the prefix.

Definition at line 23 of file minio_helper.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.minio.minio_helper._LOGGER = logging.getLogger(__name__)
private

Definition at line 18 of file minio_helper.py.

◆ _METADATA_RE

homeassistant.components.minio.minio_helper._METADATA_RE = re.compile("x-amz-meta-(.*)", re.IGNORECASE)
private

Definition at line 20 of file minio_helper.py.