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.
Public Exports
Section titled “Public Exports”| 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 |
dbx_tools.node_runtime.bootstrap
Section titled “dbx_tools.node_runtime.bootstrap”NodeEnvironment
Section titled “NodeEnvironment”class NodeEnvironmentResolved Node.js files and executable launcher directory.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:31
Fields
Section titled “Fields”package_root: Pathlauncher_directory: Pathnode: Pathnpm_cli: Path
runtime_lock_directory
Section titled “runtime_lock_directory”def runtime_lock_directory() -> PathReturn the directory used only for cross-process installation locks.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:40
prepare_node_environment
Section titled “prepare_node_environment”def prepare_node_environment(directory: str | Path | None=None, *, package_root: str | Path | None=None) -> NodeEnvironmentCreate direct Node and npm launchers backed by nodejs-wheel files.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:144
node_environment
Section titled “node_environment”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
ensure_pythonmonkey
Section titled “ensure_pythonmonkey”def ensure_pythonmonkey(lock_directory: str | Path | None=None) -> ModuleTypeReturn PythonMonkey, installing its locked version into the active environment.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/bootstrap.py:333
dbx_tools.node_runtime.runtime
Section titled “dbx_tools.node_runtime.runtime”RUNTIME_ABI_VERSION
Section titled “RUNTIME_ABI_VERSION”RUNTIME_ABI_VERSIONNo source docstring is available.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:14
MISSING
Section titled “MISSING”MISSINGNo source docstring is available.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:15
RuntimeBundle
Section titled “RuntimeBundle”class RuntimeBundleOne package-specific JavaScript bundle loaded into the shared runtime.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:23
Methods
Section titled “Methods”exports
Section titled “exports”def exports(self) -> AnyReturn the CommonJS exports object for compatibility and inspection.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:32
module
Section titled “module”def module(self, name: str) -> AnyReturn one generated JavaScript module namespace.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:37
invoke_positioned
Section titled “invoke_positioned”async def invoke_positioned(self, module: str, name: str, arguments: list[tuple[int, Any]]) -> AnyInvoke one generated function and resolve its asynchronous result.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:42
invoke_positioned_sync
Section titled “invoke_positioned_sync”def invoke_positioned_sync(self, module: str, name: str, arguments: list[tuple[int, Any]]) -> AnyInvoke one generated synchronous function.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:56
NodeObject
Section titled “NodeObject”class NodeObjectPython view over a JavaScript object from any registered bundle.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:71
get_runtime
Section titled “get_runtime”def get_runtime() -> AnyReturn the process-wide shim runtime, loading it once.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:114
get_builtin
Section titled “get_builtin”def get_builtin(name: str) -> AnyReturn one compatibility module from the shared shim registry.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:133
load_bundle
Section titled “load_bundle”def load_bundle(path: str | Path, *, bundle_id: str | None=None, abi_version: int=RUNTIME_ABI_VERSION) -> RuntimeBundleLoad and cache one package-specific CommonJS bundle.
Source: packages/py/node-runtime/src/dbx_tools/node_runtime/runtime.py:139