Main Content

Integrate a Python Package

To integrate a MATLAB® Compiler SDK™ Python® Package:

  1. In consultation with the MATLAB programmer, collect the MATLAB function signatures that comprise the services in the application.

  2. Install and import the compiled Python package.

    See Install and Import MATLAB Compiler SDK Python Packages.

  3. Write the Python code to initialize MATLAB Runtime and load the MATLAB code.

    See Initialize MATLAB Runtime.

  4. Create the required MATLAB data for function inputs and outputs.

    See matlab Python Module.

  5. Invoke the MATLAB functions.

    See Invoke a Packaged MATLAB Function or Invoke a Compiled MATLAB Function Asynchronously.

  6. Terminate each package using its terminate() function. If you do not call this function explicitly, it is called automatically when the program exits.