Skip to content

dbx-tools-node-runtime Python API

For setup, workflows, and operational guidance, see the dbx-tools-node-runtime package guide.

Import package: dbx_tools.node_runtime.

Export Owner Kind
MISSING dbx_tools.node_runtime.runtime data
RUNTIME_ABI_VERSION dbx_tools.node_runtime.runtime data
NodeEnvironment dbx_tools.node_runtime.bootstrap class
NodeObject dbx_tools.node_runtime.runtime class
RuntimeBundle dbx_tools.node_runtime.runtime class
ensure_pythonmonkey dbx_tools.node_runtime.bootstrap function
get_builtin dbx_tools.node_runtime.runtime function
get_runtime dbx_tools.node_runtime.runtime function
load_bundle dbx_tools.node_runtime.runtime function
node_environment dbx_tools.node_runtime.bootstrap function
prepare_node_environment dbx_tools.node_runtime.bootstrap function
runtime_lock_directory dbx_tools.node_runtime.bootstrap function
class NodeEnvironment

Resolved Node.js files and executable launcher directory.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:31

  • package_root: Path
  • launcher_directory: Path
  • node: Path
  • npm_cli: Path
def runtime_lock_directory() -> Path

Return the directory used only for cross-process installation locks.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:40

def prepare_node_environment(directory: str | Path | None=None, *, package_root: str | Path | None=None) -> NodeEnvironment

Create direct Node and npm launchers backed by nodejs-wheel files.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:144

def node_environment(directory: str | Path | None=None, *, package_root: str | Path | None=None) -> Iterator[NodeEnvironment]

Temporarily prepend direct Node and npm launchers to PATH.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:185

def ensure_pythonmonkey(lock_directory: str | Path | None=None) -> ModuleType

Return PythonMonkey, installing its locked version into the active environment.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:333

RUNTIME_ABI_VERSION

No source docstring is available.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:14

MISSING

No source docstring is available.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:15

class RuntimeBundle

One package-specific JavaScript bundle loaded into the shared runtime.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:23

def exports(self) -> Any

Return the CommonJS exports object for compatibility and inspection.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:32

def module(self, name: str) -> Any

Return one generated JavaScript module namespace.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:37

async def invoke_positioned(self, module: str, name: str, arguments: list[tuple[int, Any]]) -> Any

Invoke one generated function and resolve its asynchronous result.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:42

def invoke_positioned_sync(self, module: str, name: str, arguments: list[tuple[int, Any]]) -> Any

Invoke one generated synchronous function.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:56

class NodeObject

Python view over a JavaScript object from any registered bundle.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:71

def get_runtime() -> Any

Return the process-wide shim runtime, loading it once.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:114

def get_builtin(name: str) -> Any

Return one compatibility module from the shared shim registry.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:133

def load_bundle(path: str | Path, *, bundle_id: str | None=None, abi_version: int=RUNTIME_ABI_VERSION) -> RuntimeBundle

Load and cache one package-specific CommonJS bundle.

Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:139