This article covers how to import Python Libraries and modules into a Data Block using Configuration Data Blocks. Users should not attempt to import a library using the Python Built-in “import”.
To import Whitelisted Python Libraries into a Data Block, users must create a Configuration Data Block. The following information is based on the Calculation Environment (CalculationEnv) Data Block. The user is then expected to update the Example Definition, but keeping the JSON format.
Note that users should not attempt to use the Python Built-in “import” directly in a Data Block.
General Info #
Field | Value |
---|---|
Name | Any* |
Block Category | Configuration |
Block Type | Python Environment |
Data Category | None |
Output Type | Settings |
Dependencies #
None
Example Definition #
{
"imports": [
{"name": "pandas","as": "pd"},
{"name": "numpy","as": "np"},
{"name": "json","as": "json"},
{"name": "datetime","as": "datetime"}
]
}
Example Request #
None
Example Response #
None