When I am running a script inside DSS, I can do this:
from dataiku.scenario import Scenario
s = Scenario()
vars = s.get_all_variables()
When I am using an external client, I can get variables like this:
client = dataikuapi.DSSClient("myhost", "mykey")
vars = client.get_variables()
My questions are:
You can use the dataiku internal python api to get access to project variables without starting a DSS client.
Something like this should help you
proj_var = dataiku.get_custom_variables()
Thanks for the response.
My requirement is to access global and project variables. For testing with an external client I won't necessarily have a project context so my choice seems to be between "get_all_variables()" internally and "get_variables()" externally. For the latter, it seems I need admin privileges; this is not a problem long-term but it adds a bit of inconsistency in testing code developed on a PC.