Use plugin code env in a python recipe

clemEs
clemEs Registered Posts: 9 ✭✭✭

Hi,

I'm trying to use a code env in a python recipe that is inhetited by a plugin code env.

I would like to minimize the maintenance of code env librairies both in the plugin and in the project.

I asked my admin to share the plugin code env with my group but in the advanced settings of the python recipe I cannot see the code env.

Any input or head's up appreciated

Cheers

Tagged:

Answers

  • StanG
    StanG Dataiker, Registered Posts: 52 Dataiker
    edited July 17

    Hi,
    There is no clean way to use a plugin code env within a python code recipe.
    However, you could still set the code env of a python recipe using the API and doing something like:

    import dataiku
    project = dataiku.api_client().get_project(PROJECT_KEY)
    recipe = project.get_recipe(PYTHON_RECIPE)
    recipe_settings = recipe.get_settings()
    recipe_settings.set_code_env(code_env=PLUGIN_CODE_ENV)
    recipe_settings.save()
Setup Info
    Tags
      Help me…