Skip to main content
When a Python package’s name matches its import name, you can use it in your Python code steps without any special configuration. But some package names do not match their import names. Use the add-package comment to work with these packages.

Using Magic Comments

When a package’s name doesn’t match the import name, you can install the package with the add-package comment above your imports. For example the google.cloud package exports bigquery, but you can still use it in your Python code steps in workflows:
When using multiple imports that need magic comments, ensure all comments are at the start of the code. Example:

Search mappings

Search by package name, and you’ll find both the add-package comment and the import statement you’ll need to use for the package. Search by package name