Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

Get a list of code environments that use a specific python package and the version specified?

Solved!
info-rchitect
Level 6
Get a list of code environments that use a specific python package and the version specified?

Hi,

We have an internal python package that gets used by dozens of code environments and we need to know which code environments those are and what version is present.  Is there a way to do this with DSS?

thx in advance


Operating system used: Windows 10

1 Solution
JuanE
Dataiker

You can use the Python DSS API to automate this kind of task (and many others). This is the starting point to learn more about this:

https://developer.dataiku.com/

In particular, you'd want to use this method:

https://developer.dataiku.com/latest/api-reference/python/client.html#dataikuapi.DSSClient.list_code...

And then leverage the code environment Class to retrieve information on them and implement whatever logic you want:

https://developer.dataiku.com/latest/api-reference/python/code-envs.html#dataikuapi.dss.admin.DSSCod...

There are some usage examples here that will help you get started:

https://developer.dataiku.com/latest/concepts-and-examples/code-envs.html

I hope that helps.

View solution in original post

1 Reply
JuanE
Dataiker

You can use the Python DSS API to automate this kind of task (and many others). This is the starting point to learn more about this:

https://developer.dataiku.com/

In particular, you'd want to use this method:

https://developer.dataiku.com/latest/api-reference/python/client.html#dataikuapi.DSSClient.list_code...

And then leverage the code environment Class to retrieve information on them and implement whatever logic you want:

https://developer.dataiku.com/latest/api-reference/python/code-envs.html#dataikuapi.dss.admin.DSSCod...

There are some usage examples here that will help you get started:

https://developer.dataiku.com/latest/concepts-and-examples/code-envs.html

I hope that helps.

Labels

?
Labels (1)

Setup info

?
A banner prompting to get Dataiku