How to Connect to DaVinci Resolve with the Python API
A reliable Resolve Scripting API entry point: import the module, call scriptapp("Resolve"), and verify the active project
Build a dependable starter template for external Python scripts: locate DaVinciResolveScript, obtain the Resolve application object, inspect the installed version, access Project Manager, and verify that a project is open.
API
Resolve Scripting API
Language
Python
Resolve
19–20+
Requires
Running Resolve
Syntax
resolve = dvr.scriptapp("Resolve")Parameters
- • "Resolve" is the application name requested from DaVinciResolveScript.
Returns
A Resolve application object, or None when the running application is not available to the scripting process.
import os
import sys
from pathlib import Path
def import_resolve_module():
try:
import DaVinciResolveScript as dvr
return dvr
except ImportError:
search_paths = [
os.environ.get("RESOLVE_SCRIPT_API", ""),
os.environ.get("RESOLVE_MODULES", ""),
r"C:\\ProgramData\\Blackmagic Design\\DaVinci Resolve\\Support\\Developer\\Scripting\\Modules",
"/opt/resolve/Developer/Scripting/Modules",
"/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting/Modules",
str(Path.home() / "Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting/Modules"),
]
for path in search_paths:
if path and os.path.isdir(path) and path not in sys.path:
sys.path.append(path)
import DaVinciResolveScript as dvr
return dvr
dvr = import_resolve_module()
resolve = dvr.scriptapp("Resolve")
if not resolve:
raise RuntimeError("DaVinci Resolve was not found. Start Resolve and verify Scripting API access.")
print("Resolve version:", resolve.GetVersionString())
project_manager = resolve.GetProjectManager()
project = project_manager.GetCurrentProject()
if not project:
raise RuntimeError("Open a DaVinci Resolve project before running the script.")
print("Current project:", project.GetName())Guide
What the script does
The script first loads the official Resolve Scripting API Python module. It then calls scriptapp("Resolve") to obtain the main application object, prints the Resolve version, accesses Project Manager, and finally checks whether a project is open. This is a safe entry point because connection problems are detected before the script reaches media import, timeline edits, or rendering.
Why the module search matters
DaVinciResolveScript is not always available on the default Python path. The example first tries a normal import, then adds common Resolve module locations for Windows, Linux, and macOS. This makes the connection block easier to move between workstations and less dependent on one machine-specific configuration.
How to reuse the connection block
The same startup code can sit at the beginning of project creation, Media Pool import, timeline creation, FPS inspection, clip iteration, or Render Queue scripts. Once a valid project object is available, the script can safely continue with project.GetMediaPool(), project.GetCurrentTimeline(), or project render methods.
A practical foundation
Treat this code as a small bootstrap layer for your own Resolve automation. It establishes the application connection, validates the current project, and gives later functions a predictable starting state.
How the example works
Load the module
Try a normal DaVinciResolveScript import first, then add the standard Resolve scripting-module locations for Windows, Linux, and macOS when needed.
Get the Resolve object
scriptapp("Resolve") returns the main application object. Stop immediately if that call does not return a usable object.
Verify the application
GetVersionString() is a simple read-only check that confirms Python is connected to the running Resolve instance.
Validate the project
GetProjectManager() and GetCurrentProject() establish whether the user has an active project before later automation touches Media Pool, Timeline, or rendering.
Resolve API notes
- DaVinci Resolve must be running before scriptapp("Resolve") can return the application object.
- If importing DaVinciResolveScript fails, verify the Developer/Scripting/Modules path.
- GetCurrentProject() returns None when no project is open.
- When running an external Python interpreter, use an environment that can access the Resolve scripting module.
Common errors
DaVinciResolveScript cannot be imported
Reason: Python cannot see the Resolve Developer/Scripting/Modules directory.
Fix: Check RESOLVE_SCRIPT_API, RESOLVE_MODULES, or append the correct Resolve scripting-module path to sys.path.
resolve is None
Reason: Resolve is not running, or the current Python process cannot access the Scripting API.
Fix: Start Resolve and retry from the same Python environment that will run your production scripts.
project is None
Reason: Resolve is connected, but no project is currently open.
Fix: Open a project manually or load one through Project Manager before continuing.
Next step
After a successful connection, the usual next step is to obtain Project Manager and the current project.
Related API guides
Getting Started
How to Diagnose DaVinci Resolve Scripting API Access
Use a read-only diagnostic script to identify where Resolve scripting access is failing: Python module lookup, the running application connection, scriptapp(), or the current Resolve environment.
Projects
How to Get the Current DaVinci Resolve Project in Python
Get the project currently open in Resolve and verify the active Timeline before importing media, reading settings, exporting audio, or starting render automation.
Projects
How to Create a DaVinci Resolve Project with the Python API
Create a Resolve project through Project Manager without producing unnecessary duplicates, and fall back to loading an existing project when the requested name is already present.

