Cefpython
Python bindings for the Chromium Embedded Framework (CEF)
Install / Use
/learn @cztomczak/CefpythonREADME
CEF Python
Table of contents:
Introduction
CEF Python is an open source project founded by Czarek Tomczak in 2012 to provide Python bindings for the Chromium Embedded Framework (CEF). The Chromium project focuses mainly on Google Chrome application development while CEF focuses on facilitating embedded browser use cases in third-party applications. Lots of applications use CEF control, there are more than 100 million CEF instances installed around the world. There are numerous use cases for CEF:
- Use it as a modern HTML5 based rendering engine that can act as a replacement for classic desktop GUI frameworks. Think of it as Electron for Python.
- Embed a web browser widget in a classic Qt / GTK / wxPython desktop application
- Render web content off-screen in applications that use custom drawing frameworks
- Use it for automated testing of web applications with more advanced capabilities than Selenium web browser automation due to CEF low level programming APIs
- Use it for web scraping, as a web crawler or other kind of internet bots
CEF Python also provides examples of embedding CEF for many Python GUI frameworks such as PyQt, wxPython, PyGTK, PyGObject, Tkinter, Kivy, Panda3D, PyGame, PyOpenGL, PyWin32, PySide and PySDL2.
Install
Command to install with pip:
pip install cefpython3==66.1
Hosted at pypi/cefpython3. On Linux pip 8.1+ is required.
You can also download packages for offline installation available on the GitHub Releases pages.
Below is a table with supported platforms, python versions and architectures.
OS | Py2 | Py3 | 32bit | 64bit | Requirements --- | --- | --- | --- | --- | --- Windows | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 | Yes | Yes | Windows 7+ (Note that Python 3.9 supports Windows 8.1+) Linux | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Debian 8+, Ubuntu 14.04+,<br> Fedora 24+, openSUSE 13.3+ Mac | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | No | Yes | MacOS 10.9+
Examples
Support
- Ask questions and report problems on the Forum
- Supported examples are listed in the README-examples.md file
- Documentation is in the docs/ directory:
- API reference is in the api/ directory:
- Additional documentation is available in Issues labelled Knowledge Base
- To search documentation use GitHub "This repository" search at the top. To narrow results to documentation only select "Markdown" in the side pane
Support development
To support general CEF Python development efforts you can make a donation using PayPal button below:
<a href='https://www.paypal.com/donate/?hosted_button_id=V7LU7PD4N4GGG'> <img src='https://raw.githubusercontent.com/wiki/cztomczak/phpdesktop/donate.gif' /> </a><br>Seeking sponsors
CEF Python is seeking companies to sponsor development of this project. Most important thing would be to have continuous monthly releases with updates to latest Chromium. There is also lots of cool features and new settings that would be nice to implement. We have not yet exposed all of upstream CEF APIs. If your company would like to sponsor CEF Python development efforts then please contact Czarek. There are no active sponsors at this moment.
Previous sponsors
<table> <tr> <td> <div align="center"> <a href="https://www.fivestars.com/"> <img src="https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/fivestars200.png"> </a><br> <a href="https://www.fivestars.com/">www.fivestars.com</a> </div> </td> <td> <div align="center"> <a href="https://lampix.com/"> <img src="https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/lampix200.png"> </a><br> <a href="https://lampix.com/">www.lampix.com</a> </div> </td> <td> <div align="center"> <a href="http://www.blueplanet.com/"> <img src="https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/cyan_new_logo_200x48.png"> </a><br> <a href="http://www.blueplanet.com/">www.blueplanet.com</a> </div> </td> </tr> <tr> <td> <div align="center"> <a href="https://highside.io/"> <img src="https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/highside-onlight-200x48.png"> </a><br> <a href="https://highside.io/">www.highside.io</a> <div align="center"> </td> <td> <div align="center"> <a href="http://www.rentouch.ch/"> <img src="https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/rentouch.png"> </a><br> <a href="http://www.rentouch.ch/">www.rentouch.ch</a> </div> </td> <td> <div align="center"> <a href="https://www.jetbrains.com/pycharm/"> <img src="https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/pycharm.png"> </a><br> <a href="https://www.jetbrains.com/pycharm/">www.jetbrains.com</a> </div> </td> <tr> </table>API
Modules
- cefpython module
Settings
- ApplicationSettings dictionary
- BrowserSettings dictionary
- CommandLineSwitches dictionary
Classes and objects
- Browser object
- Callback object
- Cookie class
- CookieManager class
- DpiAware class (Win)
- DragData object
- Frame object
- Image object
- JavascriptBindings class
- JavascriptCallback object
- PaintBuffer object
- Request class
- Response object
- WebPluginInfo object
- WebRequest class
- WindowInfo class
- WindowUtils class
Client handlers (interfaces)
- AccessibilityHandler
- DisplayHandler
- DownloadHandler
- FocusHandler
- JavascriptDialogHandler
- KeyboardHandler
- LifespanHandler
- LoadHandler
- RenderHandler
- RequestHandler
- ResourceHandler
- V8ContextHandler
Other interfaces
- CookieVisitor interface
- StringVisitor interface
- WebRequestClient interface
API index
- AccessibilityHandler (interface)
- Application settings
- accept_language_list
- app_user_model_id
- auto_zooming
- background_color
- browser_subprocess_path
- cache_path
- command_line_args_disabled
- context_menu
- downloads_enabled
- external_message_pump
- framework_dir_path
- ignore_certificate_errors
- javascript_flags
- locale
- locales_dir_path
- [debug](api/ApplicationSettings.md#debu
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
90.0kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
343.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
