AutomatorsDocs
Scenarios

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

A scenario declares what it needs in a # requirements: comment block at the top of the script, one requirement per commented line:

# requirements:
# openpyxl==3.1.5
# uvicorn[standard]>=0.30

import os

The block is read when the scenario is saved and installed before the script runs. It ends at the first line that is not a comment, so an ordinary comment further down the file is never mistaken for a requirement.

Only plain package requirements are accepted: a name, optional extras and optional version specifiers. Index URLs, editable installs, -r includes, direct URLs and environment markers are dropped rather than handed to pip, so a script cannot change where its packages come from. A dropped line does not fail the save, which means an unusual entry shows up as a missing package at import time - confirm the import in a small test run before relying on it.

Pin tested versions, and remember the runner must be able to reach the package source. Installation failures appear in the run log before your script's own output.

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.

On this page