{"id":1962,"library":"choreographer","title":"Choreographer","description":"Choreographer is a Python library by Plotly that enables remote control of browsers, primarily for generating static images from browser-based charting tools, but also supports other use cases. It acts as a DevTools Protocol implementation for Chrome-ish browsers, leveraging the user's local Chrome binary. Currently at version 1.2.1, it is actively developed with recent updates in late 2025.","status":"active","version":"1.2.1","language":"en","source_language":"en","source_url":"https://github.com/plotly/choreographer","tags":["browser automation","devtools protocol","plotly","chrome","asyncio"],"install":[{"cmd":"pip install choreographer","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required for logging capabilities.","package":"logistro","optional":false},{"reason":"Required for JSON processing.","package":"simplejson","optional":false}],"imports":[{"symbol":"Browser","correct":"import choreographer as choreo\nbrowser = await choreo.Browser()"}],"quickstart":{"code":"import asyncio\nimport choreographer as choreo\n\nasync def main():\n    # Launch a headless browser (default is headless=True)\n    # To see the browser, use headless=False. Ensure a Chrome-compatible browser is installed.\n    try:\n        browser = await choreo.Browser(headless=True)\n        print(f\"Browser launched: {browser.url}\")\n\n        # Create a new tab\n        new_tab = await browser.new_tab()\n        print(f\"New tab created: {new_tab.url}\")\n\n        # Navigate to a URL\n        await new_tab.navigate(\"https://www.google.com\")\n        print(f\"Navigated to: {await new_tab.get_url()}\")\n\n        # Wait for a few seconds to observe (optional)\n        await asyncio.sleep(3)\n\n        # Close the tab and then the browser\n        await new_tab.close()\n        await browser.close()\n        print(\"Browser and tab closed successfully.\")\n\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n","lang":"python","description":"This quickstart demonstrates how to launch a browser, create a new tab, navigate to a URL, and then close them using Choreographer with `asyncio`. It highlights the recommended asynchronous usage pattern. Ensure a Chrome-compatible browser (like Google Chrome or Microsoft Edge) is installed on your system for Choreographer to connect to."},"warnings":[{"fix":"Ensure you have a Chrome-compatible browser installed (e.g., Google Chrome, Microsoft Edge) and target it for automation. Be aware that non-Chrome browsers may not work as expected.","message":"Choreographer is currently a work in progress and primarily supports Chrome-ish browsers. Support for other browsers is planned but not yet implemented.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Adopt `async/await` patterns in your code for optimal performance and to leverage the full capabilities of the library.","message":"The library strongly recommends using `async/await` for asynchronous operations. While synchronous functions exist, they are intended as building blocks and might not be as efficient or robust for complex scenarios.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Verify that a Chrome-compatible browser is installed and accessible on the system where Choreographer is being run.","message":"Choreographer interacts with the Chrome binary on the user's machine. This means you need a local installation of a compatible browser for the library to function.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}