0Pricing
Mojo Academy · Lesson

Importing a Python Module

Use Python.import_module in Mojo.

Keep Your Favorites

Mojo lets you reach into Python's huge ecosystem, so you keep using the libraries you already love while gaining speed. 🐍

The Python Object

Interop starts with the built-in Python object, your gateway to importing and calling Python from inside Mojo code.

from python import Python

All lessons in this course

  1. Importing a Python Module
  2. Calling Python Functions
  3. Moving Data Across the Bridge
  4. When to Use Python Interop
← Back to Mojo Academy