Python environment
Inspect the runner environment and prepare supported dependencies.
Scenarios execute on the configured runner: hosted, self-hosted or desktop. Python and installed package versions depend on that runner release.
Inspect versions
import sys
from importlib.metadata import version
print(sys.version)
print("datamaker-py", version("datamaker-py"))The runner includes the DataMaker SDK and common libraries, but do not assume every database driver or spreadsheet engine is available. A missing package can fail a script before its main work begins.
Additional dependencies
The runner can install a supplied requirements file before execution. However, the current ordinary scenario-save path creates a fixed requirements file containing requests; it does not parse a # requirements: comment into that file. Adding such a comment alone therefore does not guarantee installation.
Use packages present in the tested runner release, or have the deployment administrator provide the required dependencies through the supported runner/scenario configuration. Confirm an import in a small test run before relying on it. This matters for optional engines such as openpyxl when reading Excel files.
Where a requirements file is supplied, pin tested versions and ensure the runner can reach the package source. Installation failures appear before script execution in the run logs.
Files and configuration
Use DATAMAKER_WORKSPACE_UPLOADS and DATAMAKER_WORKSPACE_OUTPUTS instead of assuming a fixed /workspace path. Read application-specific scenario variables with os.environ and keep credentials out of source and logs.
There is no blanket guarantee that arbitrary subprocesses are blocked or that network isolation is identical across deployments. Run trusted code with appropriate credentials and confirm the execution host's network access.
Local development
Install the Python SDK, configure API access and run your script in a Python environment containing the dependencies you need. Local execution does not automatically inject scenario paths or synchronize files; configure those explicitly or run through the desktop application.