Skip to main content

Execute async Python

POST 

/code/async-python

This endpoint runs Python code in a Linux sandbox using the CPython interpreter. In contrast to the normal Python endpoint, this endpoint returns immediately, and the result of your code is sent to a webhook. You can return data using the print statement. To import dependencies, first add all the dependencies to the requirements array, and then import them using the common import statement. All dependencies will be automatically downloaded and installed for you, with the exception of native system dependencies. There is a time limit of 30 minutes and a memory limit of 512MB applied to your code, which also includes the dependency download process. The execution of this module costs 50 credits for every started 3 minutes of execution, so at least 50 and at most 500 credits.

Request

Header Parameters

    ipaas string

Bodyrequired

    codestringrequired

    The Python script that will be executed.

    requirementsstring[]

    The PyPI libraries your Python code requires.

    dependenciesstring[]

    The system dependencies your Python code requires. These will be installed using apk, the Alpine Package manager.

    sendTostring

    The URL of the webhook the response will be sent to.

Responses

Success

Schema
    statusstringrequired
    taskIdstringrequired