Skip to main content

cdpwave

CI Tests Docs Release PyPI Python License: MIT

Chrome DevTools Protocol for Python — direct, typed, async.

cdpwave talks to Chrome over a raw WebSocket. No Node.js, no ChromeDriver, no browser downloads. Just pure Python with full type hints and async-first design.

Why cdpwave?

  • Full CDP coverage — all 60 CDP domains implemented with 685 typed methods
  • Direct WebSocket — single connection to Chrome's DevTools Protocol, no intermediate layers
  • Fully typedmypy --strict across the entire codebase, IDE autocomplete everywhere
  • Async-first — built on asyncio, no threading, no blocking calls
  • Browser detection — finds Chrome, Edge, Brave, or Chromium already on your system
  • Flatten sessions — one WebSocket for all tabs via Target.attachToTarget + sessionId
  • Escape hatchsession.send("Any.CDPMethod", params) for any uncovered command
  • HTTP discovery — typed access to /json/version and /json/list endpoints
  • WebSocket keepalive — automatic ping/pong with configurable interval and timeout
  • Direct WebSocket URLCDPClient.connect(ws_url=...) bypasses HTTP discovery
  • Event helperssession.wait_for_event() and session.on() for async event handling
  • Multi-tab sessionsclient.sessions property tracks all active sessions
  • Integration tested — 322 integration tests against a real Chromium browser covering all domains

Install

pip install cdpwave

Quick start

import asyncio
from cdpwave import CDPClient

async def main() -> None:
    async with await CDPClient.launch(headless=True) as client:
        session = await client.new_page("https://example.com")
        result = await session.runtime.evaluate("document.title", return_by_value=True)
        print(result["result"]["value"])  # "Example Domain"
        await session.close()

asyncio.run(main())

Documentation

Full documentation at mathiaspaulenko.github.io/cdpwave.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines on development setup, code style, testing, and pull request process.

Please read our Code of Conduct before participating.

Security

Found a vulnerability? See SECURITY.md for responsible disclosure.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdpwave-3.1.1.tar.gz (485.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdpwave-3.1.1-py3-none-any.whl (164.0 kB view details)

Uploaded Python 3

File details

Details for the file cdpwave-3.1.1.tar.gz.

File metadata

  • Download URL: cdpwave-3.1.1.tar.gz
  • Upload date:
  • Size: 485.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cdpwave-3.1.1.tar.gz
Algorithm Hash digest
SHA256 3fc5222fd6242be1ad069663f11b923668f20dfeaa63423a67cca94b78095bc7
MD5 af32854132f373451c62ddc47cf2e809
BLAKE2b-256 90645ed2b47612f10a35756e4dae4fc4f5e7011e685c10095f7b8a929ab01528

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdpwave-3.1.1.tar.gz:

Publisher: release.yml on MathiasPaulenko/cdpwave

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cdpwave-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: cdpwave-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 164.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cdpwave-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 753571783d12d8b32ee134aa428b6978e0e1cd4d85f58053358fc07dc66597e4
MD5 46d0c411a69406ea80f245a58f310e1b
BLAKE2b-256 6d393186a33057f755f6861446da8b230a4ea863713a3475f9b5466fbeb6145f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdpwave-3.1.1-py3-none-any.whl:

Publisher: release.yml on MathiasPaulenko/cdpwave

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

3.2.1

2 files

3.2.0

2 files

3.1.9

2 files

3.1.8

2 files

3.1.7

2 files

3.1.6

2 files

3.1.5

2 files

3.1.3

2 files

3.1.2

2 files

This release

3.1.1 This release

2 files

3.1.0

2 files

3.0.1

2 files

2.6.0

2 files

2.5.0

2 files

2.4.0

2 files

2.3.0

2 files

2.2.1

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.11.0

2 files

1.10.0

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.1.0

2 files

1.0.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page