Stream: python

Topic: secure store authentication


view this post on Zulip Jan Range (Feb 28 2025 at 15:58):

I have implement an auth mechanism for dvcli in Rust which makes use of the OS secure store. It safely stores base URL and token pairs under an alias. With this users can invoke dvcli functions and pass an optional profile flag with the alias to re-use the token and url. Here is an example:

dvcli auth set -n <NAME> -t <TOKEN> -u <URL>
dvcli -p <NAME> dataset upload -i <PID> <PATHS>

I was wondering if this would also be worth looking into for pyDataverse and easyDataverse? Something along these lines:

api = NativeApi(profile="darus")

This way one can use the profile system-wide without the need of copy-pasting the token and URL all the time. Its not as nice as having SSO, but it adds some convenience.

view this post on Zulip Philip Durbin 🚀 (Feb 28 2025 at 15:59):

Sure, sounds nice.


Last updated: Nov 01 2025 at 14:11 UTC