Python SDK imports_passed_through question

Hello everyone :slight_smile:

So i might have a rather dumb question, but i just could not find the answer anywhere, so …

Given that i have a workflow.py that imports some activities and other modules, i would put those imports within imports_passed_through, so that they are not re-imported for every workflow run (if im sure that they don’t case unwanted side-effects). So far i do understand the concept of sandboxing.

In the imported acitivity.py or helpers.py i now also import other modules, that i don’t want to be reloaded within the sandbox. Should i use imports_passed_through here, too, now? Or is imports_passed_through in the workflow.py recursive?

Also. Are acitvities themself also executed within an own sandbox? So do we need to use imports_passed_through here too, when they are executed for example by an own worker.

Thank you.

Hi no dumb question

yes, imports_passed_through is recursive, and you need to pass through activities as well

Antonio