{"id":17912603,"url":"https://github.com/symonk/python-cdp","last_synced_at":"2026-01-21T10:38:02.969Z","repository":{"id":149992108,"uuid":"612757700","full_name":"symonk/python-cdp","owner":"symonk","description":":snake: Pythonic marshalling for the devtools protocol","archived":false,"fork":false,"pushed_at":"2023-07-24T19:58:12.000Z","size":2023,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T08:10:55.344Z","etag":null,"topics":["chrome","devtools-protocol","python"],"latest_commit_sha":null,"homepage":"https://symonk.github.io/python-cdp/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/symonk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-11T22:06:22.000Z","updated_at":"2024-07-11T19:03:58.000Z","dependencies_parsed_at":"2023-07-30T05:15:11.215Z","dependency_job_id":null,"html_url":"https://github.com/symonk/python-cdp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/symonk/python-cdp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symonk%2Fpython-cdp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symonk%2Fpython-cdp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symonk%2Fpython-cdp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symonk%2Fpython-cdp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symonk","download_url":"https://codeload.github.com/symonk/python-cdp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symonk%2Fpython-cdp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","devtools-protocol","python"],"created_at":"2024-10-28T19:46:08.019Z","updated_at":"2026-01-21T10:38:02.952Z","avatar_url":"https://github.com/symonk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![version](https://img.shields.io/pypi/v/python-cdp?color=green)](https://pypi.org/project/python-cdp/)\n[![supports](https://img.shields.io/pypi/pyversions/python-cdp?color=blue\u0026label=supports)](https://pypi.org/project/python-cdp/)\n[![test coverage](https://codecov.io/gh/symonk/python-cdp/branch/main/graph/badge.svg)](https://codecov.io/gh/symonk/python-cdp)\n[![docs](https://img.shields.io/badge/documentation-online-brightgreen.svg)](https://symonk.github.io/python-cdp/)\n\n\n# python-cdp (**ALPHA**)\n\n-----\n\n`python-cdp` is a python library that can be used to attach to a remotely running chrome instance for debugging.  In order to\nconnect to the browser it should be launched with `--remote-debugging-port=X`.  `python-cdp` exposes a simple client for `asyncio`\nand various wrappers for the devtools protocol.  This is all event driven and bidirectional via websockets.\n\nThe protocol itself at the tip of tree is moving fast, this library aims to support all domains that are not currently deprecated.\n\n\n-----\n\n#### Low Level Details\n\nChrome devtools protocol is built on the concept of `Domains`.  These domains typically expose an API\nin the form of:\n\n    * Commands\n    * Types\n    * Events\n\nEach `Domain` advertised by the CDP will have its own module file written in `python_cdp/cdp/{domain}.py` and have fully\ntype hinted classes for (de)serialisation.\n\n-----\n### Goals for Future\n\n`python-cdp` aims to implement a typed API for the protocol (and maintain) that fully going forward.  Eventually\nit hopes to expose a websocket connection/API for actually interacting with the protocol but that is a way\noff yet.\n\n - Full marshalling capabilities for all non deprecated domains.\n - An `asyncio` client for interacting and connecting to chrome in debug mode.\n - Useful utilities for making interactions that little bit easier.\n - 100% type hinted code base\n - Completely auto generated client to make changes and releases as pain free as possible.\n - Auto detection of upstream protocol rollups and auto releases triggered.\n\n\n -----\n\n ## Contributing \n\n This project takes the devtools protocol json files and based on those generates python source code.  It is not currently building\n AST trees to unparse but it may do so in future, for now it is generating relatively complex source code (largely in the form of\n python dataclasses).  In order to generate the files again do the following:\n\n\n ```shell\n poetry shell\n poetry install\n python -m python_cdp.generate\n tox -e linting  # format the generated source code (will unstage)\n # inspect the `python_cdp/cdp/*` directory.\n ```\n\nThe CDP protocol repository is a submodule within this repository and will be automatically updated when google releases changes on\nthe upstream repository.\n\nThe power of keeping the repository auto generated is that it requires minimmal maintenance work when the `tip-of-the-tree` for the\nprotocol is updated which is pretty much every day, the target is forever moving.\n\n-----\n\n## Useful utilities\n\nThe below examples use the power `jq` tool to generate output that can be useful for debugging or checking things that should be\ngenerated etc.\n\n### Generating all the possible properties that an `Event` class may need:\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymonk%2Fpython-cdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymonk%2Fpython-cdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymonk%2Fpython-cdp/lists"}