Justin Mayer
11/28/2023, 5:39 AMHTTPBasicAuth
to an APIDataSet
?
api_ds:
type: api.APIDataSet
url: <https://my_url.com/data>
method: POST
headers:
Content-Type: application/json
credentials: cred
credentials.yml
look like:
cred:
username: XxX
password: XxX
It then become a tuple, but I would need to make use of HTTPBasicAuth
function from requests instead. Thanks!Deepyaman Datta
11/28/2023, 6:43 AMJustin Mayer
11/28/2023, 7:13 AMos.environ["key"] = json.dumps(
{
"username": "XxX",
"password": "XxX",
}
)
CONFIG_LOADER_ARGS = {
"custom_resolvers": {
"HTTPBasicAuth": lambda: HTTPBasicAuth(**json.loads(oc.env("key"))),
},
}
Is there a way to take the credentials from the credentials.yml
here?Takieddine Kadiri
11/28/2023, 1:25 PMcredentials.yml
cred:
- username
- password
Justin Mayer
11/29/2023, 5:05 AMTakieddine Kadiri
11/29/2023, 8:33 AMJustin Mayer
11/29/2023, 11:37 AM