Method
createModule POST
Copy POST

Creates a module that's re-usable in customer's code, e.g. python function, bring your own algorithm and etc.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes name str The name to identify the module, only lower case letters and underscore allowed.
No sourceCode str Contents of a valid python source code file.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
result Module
KEY TYPE Description
name str The name to identify the algorithm. Only uppercase letters, numbers, and underscores are allowed.
createdAt str The date and time when the Python function was created, in ISO-8601 format.
notebookId str The unique string identifier of the notebook used to create or edit the module.
hideModuleCode bool Whether the module code is hidden from external users
codeSource CodeSource Information about the source code of the Python function.
KEY TYPE Description
sourceType str The type of the source, one of TEXT, PYTHON, FILE_UPLOAD, or APPLICATION_CONNECTOR
sourceCode str If the type of the source is TEXT, the raw text of the function
applicationConnectorId str The Application Connector to fetch the code from
applicationConnectorInfo str Args passed to the application connector to fetch the code
packageRequirements list The pip package dependencies required to run the code
status str The status of the code and validations
error str If the status is failed, an error message describing what went wrong
publishingMsg dict Warnings in the source code
moduleDependencies list The list of internal modules dependencies required to run the code
Language: