CodePythonDifferent PyPI package name and import name

Use PyPI packages with differing import names

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:

# pipedream add-package google-cloud-bigquery
from google.cloud import bigquery

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.

PyPI Package NameImport into Pipedream with