Closed andy-esch closed 6 years ago
Hi Andy,
sorry for the late response.
The FR seems good to me :) I'll take a look ASAP
I ended up doing my own version in cartoframes:
def _is_authenticated(self):
"""Checks if credentials allow for authenticated carto access"""
try:
self.sql_client.send(
'select * from information_schema.tables limit 0')
except CartoException as err:
raise CartoException('Cannot authenticate user `{0}`. Check '
'credentials ({1}).'.format(
self.creds.username(),
err))
I'm sure there's a better way to check authentication, but that's method seems like an ok first pass. And I think the carto python package is a more natural place for this functionality.
Since you have a temporary solution in place, I'd wait till the new Auth API to see what implications it has with the SDK and so on.
So leaving this open at the moment.
Thanks!
Adding an
.is_valid()
method would be pretty useful for establishing if an application is good-to-go before starting to perform operations. I suppose this could be pulled off a bare-bones API request, but it would be useful to have a purpose-built method for doing this instead.