PythonClient Programming
TheMATLAB®Production Server™Python client API enables developers to evaluate MATLAB functions on remote servers. The API lets you pass scalar values to a MATLAB function using native Python types. When working with arrays, you need to use the MATLAB array types provided in thematlab
package. For information on using MATLAB arrays in Python, seematlab Python模块.
For an overview of how to create client programs, seeCreate a MATLAB Production Server Python Client.
For a complete example of a client implementation, seeCreate a Python Client.
Note
Starting in R2022b, the Python client library will not support Python 2.7. If you want to use Python 2.7 to develop client applications, you can continue using the R2022a version of the Python client library in future releases.
Classes
matlab.production_server.client.MWHttpClient |
Pythonobject encapsulating a connection to aMATLABProduction Serverinstance |
Topics
Create Applications
- Create a MATLAB Production Server Python Client
Call a MATLAB function deployed toMATLAB Production Serverfrom a Python application. - Install the MATLAB Production Server Python Client
Install the packages required to use the Python client. - Create a Python Client
Learn how to call a MATLAB function deployed toMATLAB Production Serverfrom a Python application. - Create Client Connection
Create a connection from a Python client to aMATLAB Production Serverinstance. - Invoke Packaged MATLAB Functions
Ways to call a deployed MATLAB function using the Python client API.
Data Conversion
- Pass Data Between MATLAB Production Server and Python
Learn howMATLAB Production Serverconverts data between Python and MATLAB data types. - matlab Python模块
Use thematlab
Python module to create MATLAB numeric types as Python variables so that MATLAB arrays can be passed between Python and MATLAB. - Use MATLAB Arrays in Python
This example shows how to use MATLAB arrays in Python.
Troubleshooting
- Handle Function Processing Errors
捕获和处理errors that the server returns.