Skip to main content

Chrome DevTools Protocol for Python — direct CDP over WebSocket, no Selenium, no Playwright

Project description

cdpwave

CI Tests 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?

  • 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 uncovered domains
  • HTTP discovery — typed access to /json/version and /json/list endpoints
  • MIT licensed — permissive, compatible with any use

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:
        page = await client.new_page("https://example.com")
        result = await page.runtime.evaluate("document.title", return_by_value=True)
        print(result["result"]["value"])  # "Example Domain"
        await page.close()

asyncio.run(main())

Documentation

Full documentation at mathiaspaulenko.github.io/cdpwave.

License

MIT

Project details


Download files

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

Source Distribution

cdpwave-0.1.0.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

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

cdpwave-0.1.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cdpwave-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c451023085db465493429b60271f4cc2fd5a3188271b1d74b52c2a2783fc61c1
MD5 8e4d8d2485cd94fd9d28ae4397f57fca
BLAKE2b-256 377e73d1d5a076287b00ce20eff296cb71d36e0643b221615d2a88d94e38d525

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdpwave-0.1.0.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-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cdpwave-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64df3d02ba1b4e3a0fbc9b28b13533c7deb87c35354d8855175945a8d83bff59
MD5 2f9226608054fdc9ad04c3dc7e64ebe6
BLAKE2b-256 961a0b89c07bd42378eced33651fb693f91fbf7895f00ab9784bcd48d9c5a282

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdpwave-0.1.0-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.

Supported by

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