Thanks!! Yes that does work and let's me keep the import consistent between dagster local and dagster cloud.
I'm also trying to run the s3_test.py code locally in python using pycharm without launching the dagster UI (this is my preferred way to develop code, before running it in dagster). So right now, the import that works for dagster in the s3_test.py script is "from .spf_util.aws_secrets import get_secret_op". However, when I run the script in pycharm, it breaks:
Traceback (most recent call last):
File "/opt/project/test1/dagster_cloud_template/s3_test.py", line 9, in <module>
from .spf_util.aws_secrets import get_secret_op
ImportError: attempted relative import with no known parent package
The other way to import does work locally in pycharm, but not dagster as we discussed ("from spf_util.aws_secrets import get_secret_op"). Do you know if there is a way to keep the import consistent between this and dagster?