Importing a module with bad characters, for example, "import data-lake"

Viewed 49

I am required to import a package authored by another. My import statement looks like this:

from data-lake.libs.utils.operators import airflow_utils

Obviously this throws a syntax error, what would be the work around?

1 Answers

You can try doing

airflow_utils = __import__('data-lake.libs.utils.operators').airflow_utils
Related