Skip to content

Allow subclasses of S3Client, etc to set a custom scheme #466

@kujenga

Description

@kujenga

Currently, the guidance for accessing S3 compatible stores recommends continuing to use the S3 scheme in the path: https://cloudpathlib.drivendata.org/stable/authentication/#accessing-custom-s3-compatible-object-stores

I'd like to be able to take this a step further and customize the URL scheme. The following currently runs into an issue as cloud_prefix is not available on the client implementations, which instead hard-code their scheme.

@register_path_class("mys3")
class MyS3Path(S3Path):

    cloud_prefix: str = "mys3://"


@register_client_class("mys3")
class MyS3Client(S3Client):

    cloud_prefix: str = "mys3://"

The idea here is to allow the schemes to be customized in a similar way to how the Path implementations work:

cloud_prefix: str = "s3://"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions