Skip to main content

openocd-python

Typed, async-first Python bindings for the full OpenOCD command surface.

Install

pip install openocd-python

Quick Start

from openocd import Session

# Connect to a running OpenOCD instance
async with Session.connect() as ocd:
    state = await ocd.target.halt()
    pc = await ocd.registers.pc()
    mem = await ocd.memory.read_u32(0x08000000, 4)
    print(f"PC: {pc:#x}")

# Or spawn OpenOCD and connect
async with Session.start("interface/cmsis-dap.cfg -f target/stm32f1x.cfg") as ocd:
    await ocd.target.halt()
    regs = await ocd.registers.read_all()

# Synchronous API available too
with Session.start_sync("interface/cmsis-dap.cfg") as ocd:
    ocd.target.halt()
    print(f"PC: {ocd.registers.pc():#x}")

Features

  • Async-first with sync wrappers for every method
  • Typed returns — dataclasses, not raw strings
  • Full OpenOCD surface: target control, memory, registers, flash, JTAG, breakpoints, RTT
  • SVD decoding — read a peripheral register and get named bitfields
  • Process management — spawn and manage OpenOCD subprocesses
  • Dual transport — TCL RPC (primary) and telnet (fallback)

Requirements

  • Python 3.11+
  • OpenOCD installed and on PATH (or pass openocd_bin=)

Metadata

Release files for openocd-python 2026.2.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openocd-python 2026.2.17
File Size Uploaded Provenance
openocd_python-2026.2.17.tar.gz 66.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openocd-python 2026.2.17
File Interpreter ABI Platform
openocd_python-2026.2.17-py3-none-any.whl Python 3 none any Details

Total release size: 116.0 kB

Release files / openocd_python-2026.2.17.tar.gz

Download URL openocd_python-2026.2.17.tar.gz
Size 66.7 kB
Tags Source
SHA-256 checksum
How to use checksums
03dd1dd94e94659f40b5f4d9ae6722f843cc4b702ad3d3802b57f841a7a14584
BLAKE2b-256 checksum
How to use checksums
5aeaf4176c73012aa91e9e8dc937cdaaadfc053d54226e6e291508b8f60ef5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / openocd_python-2026.2.17-py3-none-any.whl

Download URL openocd_python-2026.2.17-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09c64c8594e40c66c2ed7391f9d89d784701e29b5c7e13343ee8a5339a3b283c
BLAKE2b-256 checksum
How to use checksums
b5fe9200e6357320f6a913c91536105b8cac0933404a3fca86563b3561c92c42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for openocd-python 2026.2.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page