Skip to content
Switch branches/tags
Go to file
This branch is 12 commits ahead of andrewleech:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


###Client for the Google Chrome browser's remote debugging api.

New update replaces old api code with new - no longer compatibile with 3+ year old chrome, now compatible with Chrome Remote Debugging Protocol

See for details on Chrome's remote debugging protocol.

The protocol is composed of json messages described on the site above.

This library makes it easier to communicate with the Google Chrome remote debugging api from Python. To enable the debugging api port, start Chrome with this option::

google-chrome --remote-debugging-port=9222

Note that Chromecast devices also open a remote debugging port and speak this same api, on devices in development mode, and which are currently running a dev app.

Then you can connect from Python through code like this:


>>> import chrome_remote_shell, json
>>> shell = chrome_remote_shell.Shell(host='localhost', port=9222)
>>> shell.connect(0)
>>> url = '' # shameless
>>> navcom = json.dumps({"id":0, "method":"Page.navigate", "params":{"url":url}})
>>> shell.soc.send(navcom)
>>> response = json.loads(shell.recv())

As a convenience, the shell connection object offers a method that, by injecting JavaScript into the first tab, commands Chrome to open a URL in a new tab::

# equivalent to the api call above
>>> shell.open_url('')


pip install --user greenlet
sudo pip install websocket-client 
sudo python install

Useful links

#CHANGELOG 2016 Dec 8. Added helper routines to Close tabs, to send arbitrary commands. Included example for network profiling.

2016 Dec 7. Pulled together useful stuff from unmerged pull requests and forks on Github

2014 Sept 15. Updated to work with modern Chrome Remote Debugging protocol

2014 Sept 15. Package maintaince transitioned to Fred Clift

2014 Sept 15. Package migrated to GitHub.

2009 Feb 26. Added a conditional import of simplejson so that the module runs under Python 2.5.


Python module to remote-control a Google Chrome instance via its remote debugging api




No packages published