delta-io / delta-sharing

An open protocol for secure data sharing
https://delta.io/sharing
Apache License 2.0
722 stars 154 forks source link

Delta Sharing Python Package to Load Credentials from String #448

Open lz100 opened 6 months ago

lz100 commented 6 months ago

Right now in the python package, one needs to specify the path of the credentials file. However, in Github Actions and similar CI environments, loading credentials from environment variables is desired. I tried to search your document, but with no result. Is there any possible way one can load from an env variable or a string, like the following?

import delta_sharing
import os

profile = os.environ["PROFILE"]

client = delta_sharing.SharingClient(config_string = profile)

A similar approach has been implemented in the delta-sharing-r package. It would be so nice if we could do the same in Python.