Python スクリプト for API タスク package

The Python スクリプト for API タスク package enables users to import and execute Python scripts using API タスク. This package leverages the Python library support within API タスク to implement complex data processing, mathematical computations and machine learning capabilities using API タスク.

Overview

The Python スクリプト for API タスク package contains actions that executes Python scripts or a specific function within the script. The workflow sequence for executing Python script is as follows:

  1. Define the source Python script and session name using the Open action.
  2. Execute the script using one of the following actions:
    • Execute function: Use when executing a specific function within the script.
    • Execute script: Use when executing the entire script.
    The Execute actions use the session name defined in the Open action to fetch the source Python script.
  3. Close the Python スクリプト session using the Close action.

The package utilizes the Wasmer Python library integrated into the API タスク runtime. The following Python libraries are supported:

Libraries Note
  • math
  • json
  • re
  • itertools
  • functools
  • datetime
Fully supported.
  • pandas (Pyodide build)
  • numpy (Pyodide build)
Both libraries require WASM wheels to be installed on the local machine.
  • requests
  • httpx
Both libraries require WASIX to be installed and networking enabled on the local machine.
  • beautifulsoup4
  • lxml (Pyodide build)
lxml requires WASM to be installed on the local machine.
  • asyncio
  • aiohttp
aiohttp requires WASIX to be installed on the local machine.
  • tqdm
  • rich
Fully supported.

Actions in Python スクリプト for API タスク package

The following actions are available in this package

アクション Description
Open

The Open action defines the source Python and creates a session for executing Python scripts

[開く] アクション.

Execute function

The Execute function action executes a specific function within the Python script defined in the Open action.

関数実行アクション.

For an example, see Python スクリプトによるリストの結合例.

Execute script

The Execute script action executes the Python script defined in the Open action.

See [スクリプトを実行] アクション.

For an example, see Python スクリプトを使用した PDF 作成の例.

Close

The Close action closes the session.

See 閉じるアクション.