Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kujenga opened this issue Aug 31, 2024 · 2 comments · Fixed by #467
Closed

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

kujenga opened this issue Aug 31, 2024 · 2 comments · Fixed by #467

Comments

@kujenga
Copy link
Contributor

kujenga commented Aug 31, 2024

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://"

@pjbull
Copy link
Member

pjbull commented Sep 20, 2024

Closing as done in #467

@pjbull pjbull closed this as completed Sep 20, 2024
@pjbull
Copy link
Member

pjbull commented Oct 18, 2024

@kujenga Just released v0.20.0 to PyPI, which includes #467. Take it for a spin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants