cloud_storage_handler.api.elixircloud.csh package

Submodules

cloud_storage_handler.api.elixircloud.csh.client module

MinIO client class and convenience functions.

class cloud_storage_handler.api.elixircloud.csh.client.MinioClient(config)[source]

Bases: object

Client for MinIO operations.

Wraps minio.Minio and adds convenience methods.

config

MinIO configuration.

client

MinIO client instance.

create_bucket()[source]

Create bucket if it does not exist.

Return type:

None

cloud_storage_handler.api.elixircloud.csh.client.register_minio_client(app)[source]

Register MinIO client and create bucket.

Parameters:

app (FlaskApp) – Connexion Flask app instance.

Return type:

FlaskApp

Returns:

Connexion Flask app instance with a MinIO client instance added to

its config.

cloud_storage_handler.api.elixircloud.csh.controllers module

ELIXIR’s Cloud Storage Handler controllers.

cloud_storage_handler.api.elixircloud.csh.controllers.home()[source]

Endpoint to return a welcome message.

cloud_storage_handler.api.elixircloud.csh.models module

Model for MinIO Configuration.

class cloud_storage_handler.api.elixircloud.csh.models.MinioConfig(**data)[source]

Bases: BaseModel

Configuration for MinIO.

hostname

The name of the host where the MinIO server is running.

port

The port on which the MinIO server is running. Must be between 1 and 65535.

access_key

The access key used for authentication with MinIO.

secret_key

The secret key used for authentication with MinIO.

bucket_name

The name of the bucket where files are stored. Must be at least 1 character long.

secure

Whether to use TLS connection to storage service or not.

client

Client instance.

Examples

MinioConfig(

hostname=”localhost”, port=9000, access_key=”minioadmin”, secret_key=”minioadmin”, bucket_name=”files”, secure=False,

)

class Config[source]

Bases: object

Model configuration.

arbitrary_types_allowed = True
access_key: str
bucket_name: Annotated[str]
client: Optional[Minio]
hostname: str
port: Annotated[int]
secret_key: str
secure: bool

Module contents

ELIXIR Cloud Storage Handler API package.