RESOLVE API / FIELD GUIDE / 01

How to Connect to DaVinci Resolve with the Python API

Obtain the application object first. Project and timeline checks are separate steps.

Set up external Python for Resolve Studio using the installed Blackmagic module, Windows/macOS/Linux paths and a product/version check. No project opening, hidden retries or random pip package.

THE RESULT

Read the running Resolve product and version without changing the working project.

PYTHON / RESOLVESTUDY MODEL
01python connect_resolve.py

Run the example in the same environment that will run your automation. Nothing on this website starts a local process.

CHECK

Python and architecture are identified.

Switching steps changes the explanation. Nothing connects to Resolve or runs on your computer.

01 / BEFORE THE CODE

Set the conditions before you run.

01

Running Resolve Studio

The primary route is external local Python with desktop Studio. Blackmagic’s 21.1 announcement assigns Python scripting to Studio; past success in Free does not establish current compatibility. Do not use a Fusion connection as an edition workaround.

02

Matching Python and installed library

The examples use Python 3.8+ syntax. Separately, use a compatible 64-bit Python interpreter and the native library from the same Resolve installation. Check the installed README for Python version and architecture requirements. “Python 3 installed” is not sufficient binary-compatibility evidence.

03

Local access, not network access

For an external script, check Preferences → System → General → External scripting using → Local where available in your version. These same-machine examples do not need Network. Running as administrator is not a general-purpose fix.

Current Studio edition guidance and the installed scripting documentation take precedence over older console or Free-edition tutorials.[1][4][3]

02 / API CONTRACT

Which object. Which method. Which result.

Blackmagic modulescriptapp("Resolve")
Input
Application name: the string "Resolve".
Returns
Resolve object; an empty result is treated as unavailable.
Check
Do not call downstream methods until an object is obtained.
ResolveGetProductName()
Input
No arguments.
Returns
Product name.
Check
Compare it to the running edition, not an assumed installation filename.
ResolveGetVersionString()
Input
No arguments.
Returns
Application version string.
Check
Keep the complete string including the build; do not compare versions lexicographically.

Resolve method contracts are documented by Blackmagic; Python and author helpers are labelled separately. The defensive checks are our example design. A non-empty object is not proof of full API compatibility.[3]

03 / UNDERSTAND

What is actually being connected

Python loads Blackmagic’s module, which loads its native scripting component and requests an object from the running Resolve application. This is an application integration, not a REST call to a website or an AI installation. MCP is another command-transport route; it is not required for this first Python example.

Separate three questions: can Python find the wrapper file, can its dependencies load, and does the application return a Resolve object? Passing one step does not prove the next. The connection example deliberately requires neither a project nor a timeline.[3]

04 / UNDERSTAND

Scripting, Modules and the native library

RESOLVE_SCRIPT_API names the Developer/Scripting root. Our helper adds Modules/DaVinciResolveScript.py itself. Pointing the variable at Modules would produce Modules/Modules. RESOLVE_SCRIPT_LIB, when set, names the actual fusionscript.dll or fusionscript.so file from the same installation.

A regular import DaVinciResolveScript needs the Modules folder on Python’s search path, for example through PYTHONPATH. Our helper does not: it loads the official file by its explicit location. It does not use RESOLVE_MODULES; a custom alias in an earlier script is not a required Blackmagic environment variable.

The paths below describe typical desktop installations. Relocated Linux installations, Mac App Store packages, sandboxes and different architectures need their own file checks. Do not download someone else’s native library or replace the installed module just to match an example.[3][5]

Windows

RESOLVE_SCRIPT_API%PROGRAMDATA%\Blackmagic Design\DaVinci Resolve\Support\Developer\ScriptingRESOLVE_SCRIPT_LIBC:\Program Files\Blackmagic Design\DaVinci Resolve\fusionscript.dll

Python wrapper: Modules/DaVinciResolveScript.py inside the Scripting directory above. Verify files in your own installation.

macOS

RESOLVE_SCRIPT_API/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/ScriptingRESOLVE_SCRIPT_LIB/Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/Libraries/Fusion/fusionscript.so

Python wrapper: Modules/DaVinciResolveScript.py inside the Scripting directory above. Verify files in your own installation.

Linux

RESOLVE_SCRIPT_API/opt/resolve/Developer/ScriptingRESOLVE_SCRIPT_LIB/opt/resolve/libs/Fusion/fusionscript.so

Python wrapper: Modules/DaVinciResolveScript.py inside the Scripting directory above. Verify files in your own installation.

These paths describe common installations, not a command to download or replace binaries. %PROGRAMDATA% is Windows environment-variable notation. The helper reads its actual value; it never executes these strings as shell commands.

05 / UNDERSTAND

A first run with no extra actions

Download both Python files into one folder. Start Resolve Studio and save your work. Open a terminal in the example folder and use the command for your interpreter. When you use an explicit Python executable path, use that same path in later diagnostics and scripts.

Expect a JSON object with two non-empty fields: product and version. These values come from the application, not a test version hard-coded by the article. Compare them with About DaVinci Resolve. There is no need to open a project for this check, so project is None is not a connection failure here.

Do not run an unknown script merely because it imports an official module. Connecting does not put later calls inside a read-only sandbox: this example is read-only because of the operations in its source.[3][4]

06 / UNDERSTAND

Why the helper does not try everything

An explicitly configured invalid path stops the example. It does not silently select another Resolve installation or turn a native-library failure into “module not found”. The original exception is chained so you can identify a missing dependency, architecture issue or import failure inside the wrapper.

This helper is authored for the site, not a Blackmagic SDK component. Its loader handles a wrapper replacing its sys.modules entry with a native module. Offline tests of that behavior do not establish compatibility between fusionscript and the Python on your workstation.[5][6]

PYTHON / COMPLETE EXAMPLE

Read the code. Then run it deliberately.

Two files in the same folder

Download connect_resolve.py and resolve_api_connection.py, or use the five-script bundle. The helper is our code; the official DaVinciResolveScript module and native library must come from your Resolve installation.

Download all examples + instructions (.zip) ↓
connect_resolve.py
"""Read application identity only. Keep resolve_api_connection.py alongside this file."""
from resolve_api_connection import connect


def inspect_application(resolve):
    product = resolve.GetProductName()
    version = resolve.GetVersionString()
    if not product or not version:
        raise RuntimeError("Application identity could not be read")
    return {"product": product, "version": version}


def main():
    import json
    result = inspect_application(connect())
    print(json.dumps(result, ensure_ascii=False, indent=2))
    # No project is required. A successful read is NOT permission for later writes.


if __name__ == "__main__":
    main()

Shared connection helper — inspect and download

This file only locates and loads the installed bridge. Native imports can write Python bytecode caches and can block; this is not a sandbox or a timeout mechanism. Use a trusted local installation.

resolve_api_connection.py
"""Load the installed Blackmagic module; do not install a similarly named package.

This helper uses standard desktop installation paths or RESOLVE_SCRIPT_API.
It does not enable scripting, start Resolve, open projects or retry API calls.
Validate Python/native-library compatibility against your installed README.txt.
"""
from __future__ import annotations

import importlib.util
import os
from pathlib import Path
import struct
import sys


class ResolveConnectionError(RuntimeError):
    """An explicit environment, module, or application-connection failure."""


def scripting_root() -> Path:
    configured = os.environ.get("RESOLVE_SCRIPT_API")
    if configured is not None:
        if not configured.strip() or configured != configured.strip():
            raise ResolveConnectionError("RESOLVE_SCRIPT_API is empty or has outer whitespace")
        if configured.startswith(('"', "'")) or configured.endswith(('"', "'")):
            raise ResolveConnectionError("Do not store literal outer quotes in RESOLVE_SCRIPT_API")
        root = Path(os.path.expandvars(configured)).expanduser()
    elif sys.platform == "win32":
        root = Path(os.environ.get("PROGRAMDATA", r"C:\ProgramData")) / "Blackmagic Design/DaVinci Resolve/Support/Developer/Scripting"
    elif sys.platform == "darwin":
        root = Path("/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting")
    elif sys.platform.startswith("linux"):
        root = Path("/opt/resolve/Developer/Scripting")
    else:
        raise ResolveConnectionError("Set RESOLVE_SCRIPT_API for this platform/installation")
    if not root.is_absolute():
        raise ResolveConnectionError("RESOLVE_SCRIPT_API must be an absolute Scripting directory")
    return root


def module_file() -> Path:
    # RESOLVE_SCRIPT_API points to Scripting, not its Modules subdirectory.
    return scripting_root() / "Modules" / "DaVinciResolveScript.py"


def load_resolve_module():
    if struct.calcsize("P") * 8 != 64:
        raise ResolveConnectionError("Use a compatible 64-bit Python interpreter")
    source = module_file()
    if not source.is_file():
        raise ResolveConnectionError("Official DaVinciResolveScript.py not found at: " + str(source))
    configured_lib = os.environ.get("RESOLVE_SCRIPT_LIB")
    if configured_lib is not None:
        lib = Path(os.path.expandvars(configured_lib)).expanduser()
        if not lib.is_absolute() or not lib.is_file():
            raise ResolveConnectionError("RESOLVE_SCRIPT_LIB must name the installed native library file")
    name = "DaVinciResolveScript"
    spec = importlib.util.spec_from_file_location(name, source)
    if spec is None or spec.loader is None:
        raise ResolveConnectionError("Cannot create a loader for the official module")
    previous = sys.modules.get(name)
    module = importlib.util.module_from_spec(spec)
    sys.modules[name] = module
    try:
        spec.loader.exec_module(module)
        # Blackmagic's wrapper can replace its sys.modules entry with a native module.
        loaded = sys.modules[name]
        if not callable(getattr(loaded, "scriptapp", None)):
            raise ResolveConnectionError("Loaded module does not expose scriptapp")
        return loaded
    except Exception as exc:
        if previous is None:
            sys.modules.pop(name, None)
        else:
            sys.modules[name] = previous
        raise ResolveConnectionError("Official module was found, but loading it failed") from exc


def connect():
    module = load_resolve_module()
    try:
        resolve = module.scriptapp("Resolve")
    except Exception as exc:
        raise ResolveConnectionError("scriptapp failed; inspect the original exception") from exc
    if not resolve:
        raise ResolveConnectionError("No Resolve object: check running Studio, Local access and Python environment")
    return resolve


def project_manager(resolve):
    manager = resolve.GetProjectManager()
    if not manager:
        raise ResolveConnectionError("Resolve connected, but Project Manager is unavailable")
    return manager

Launch commands

Windows / PowerShell

Windows / PowerShell
python .\connect_resolve.py

Run from the folder containing both Python files, with python pointing to your intended interpreter.

macOS / Linux

macOS / Linux
python3 ./connect_resolve.py

Set an absolute RESOLVE_SCRIPT_API first for a non-standard installation.

What the code does

  1. Locate the file

    Choose the standard Scripting directory or the explicit RESOLVE_SCRIPT_API root.

  2. Load dependencies

    The official wrapper loads its native dependency; failures preserve the underlying exception.

  3. Request the application

    Call scriptapp once. Stop if it returns no usable object.

  4. Verify a read

    Read only the product name and complete version string.

Boundaries to keep

The helper does not install Python, enable scripting or start Resolve.

Reading a version does not establish that a project is open.

The Blackmagic module and the site helper are different files. Download the two authored example files; the official module comes from your Resolve installation.

DEBUG / OBSERVATION FIRST

An error is a starting point, not a diagnosis.

DaVinciResolveScript.py not found

Possible reasonWrong Scripting root or a different installation.

Next checkLocate the actual file through Developer documentation. Do not append Modules to RESOLVE_SCRIPT_API.

File found, but loading it failed

Possible reasonA wrapper/native dependency failed; the module is not necessarily missing.

Next checkInspect the original exception. Match Python, bitness, architecture and RESOLVE_SCRIPT_LIB to your installation.

No Resolve object

Possible reasonThe module loaded but the application did not provide an object.

Next checkCheck running Studio, Local access and process environment. Do not add an automatic Fusion fallback.

Works in the IDE, not in the terminal

Possible reasonThe interpreter or environment differs.

Next checkCompare sys.executable and IDE settings; run diagnostics using the exact production interpreter.

PRACTICE / YOUR OWN EVIDENCE

Check that the application is not the project

  1. Run the example with a test project open and compare product/version with About.
  2. Save and close the project manually, leaving Resolve running. Read the application version again.
  3. Compare the results: an open project should not be a prerequisite for the application check. Diagnose any deviation rather than creating a project automatically.
ACCEPT WHEN

Real product/version values were read, with no create/load project, import or render call. Perform the real run on your own installation.

This is a checklist for your test, not a report of a test already performed on the website.

FAQ

Questions that matter in practice.

Do I need Studio?

Use Studio for this external Python route. Do not ignore the 21.1 scripting changes because an older Free-edition tutorial worked. This article does not promise a Console or Fusion workaround.[1][4]

Should I pip install DaVinciResolveScript?

This route uses the file installed with Resolve. A similarly named third-party package is not automatically the official module. The helper downloads no dependencies.[3]

Should I enable Network?

No. These examples run on the same machine. Check Local in your version; Network expands access and is not a generic import fix.[3]

Can I immediately use it in production?

This example reads the application only, but later code may change a project. Validate your version and a test project first; obtaining an object does not prove all future operations.

SOURCES / VERSION BOUNDARIES

Sources, not implied certification.

The source review, offline Python tests and UI checks are different kinds of evidence. None establishes that every example works with every Studio build, operating system or Python version. The date below is the editorial review date, not a live-test certificate.

  1. Blackmagic Design — DaVinci Resolve Studio 21.1 release notes

    8 September 2026. The release announcement assigns Python scripting to Studio. Edition requirements, not a test report for our examples.

  2. Blackmagic Design — Support Center

    Release catalogue checked on 5 October 2026: 21.1.1 is listed. The latest release is not the minimum version of every method.

  3. Blackmagic Scripting README — snapshot 24 July 2026 (Resolve 21.0.4)

    Public mirror of Blackmagic’s original README, maintained by X-Raym. Used for basic signatures; not official hosting and not a 21.1.1 README. Locate your installed Developer/Scripting/README.txt through Resolve’s Help/Documentation menu; exact menu nesting can vary.

  4. Blackmagic Design — Scripting and Automation

    Official description of Studio Python/Lua scripting and integrations. Do not extend Studio capabilities to Free without checking the exact release.

  5. Python — importlib

    Loading a Python source file by a known path. Our helper preserves the original exception rather than treating every ImportError as a missing wrapper.

  6. Python — ImportError and ModuleNotFoundError

    Import and dependency-loading errors are different failures; exception chains support precise local diagnosis.

KEEP BUILDING

Continue with a precise next task.

API / Getting Started

How to Diagnose DaVinci Resolve Scripting API Access

Diagnose Python, the installed module, the Resolve object and the current project. Separate loading from connection failures and produce a local JSON report without project names by default.

API / Projects

How to Get the Current DaVinci Resolve Project in Python

Obtain Project Manager, check the current project name and ID, and read timeline count and the active Timeline. An absent timeline is allowed; implicit loading and project creation are excluded.

API / Projects

How to Create a DaVinci Resolve Project with the Python API

Controlled CreateProject in a local Project Library: check name, library and folder, require a separate --apply, stop if a project is open and verify saving. No hidden LoadProject or automatic deletion.

Back to the API library →MCP and AI assistants →