GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cztomczak/cefpython: Python bindings for the Chromium Embedded Framework (CEF)

BranchesTags
Open more actions menu

Latest commit

 

History

1,303 Commits
1,303 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
api
api
 
 
docs
docs
 
 
examples
examples
 
 
patches
patches
 
 
src
src
 
 
tools
tools
 
 
unittests
unittests
 
 
.gitignore
.gitignore
 
 
Authors
Authors
 
 
CMakeLists.txt
CMakeLists.txt
 
 
License
License
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

CEF Python

Table of contents:

  • Introduction
  • Install
  • Examples
  • Support
  • Support development
  • Seeking sponsors
  • API

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:

  1. 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.
  2. Embed a web browser widget in a classic Qt / GTK / wxPython desktop application
  3. Render web content off-screen in applications that use custom drawing frameworks
  4. Use it for automated testing of web applications with more advanced capabilities than Selenium web browser automation due to CEF low level programming APIs
  5. 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, GTK 3, Tkinter, Kivy, Panda3D, PyGame, PyOpenGL, PyWin32, PySide and PySDL2.

Install

CEF Python 147 development wheels are available on GitHub Releases.

OS Python 64bit Requirements
Windows 3.10 / 3.11 / 3.12 / 3.13 / 3.14 Yes Windows 10+
Linux 3.10 / 3.11 / 3.12 / 3.13 / 3.14 Yes Ubuntu 22.04+, Debian 12+
macOS 3.10 / 3.11 / 3.12 / 3.13 / 3.14 Yes macOS 12+ (Apple Silicon/arm64 only)

macOS testing was limited to CI only. We are looking for macOS testers - please report your results.

Examples

  • Tutorial
  • All examples
  • Snippets
  • PyInstaller packager

Support

  • Ask questions and report problems on the Discussions page. You can also search the Old Forum for previous discussions.
  • Supported examples are listed in the README-examples.md file
  • Documentation is in the docs/ directory:
    • Build instructions
    • Contributing code
    • Knowledge Base
    • Migration guide
    • Tutorial
  • API reference is in the api/ directory:
    • API categories
    • API index
  • 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:


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.

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
  • 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)
    • _OnAccessibilityTreeChange
    • _OnAccessibilityLocationChange
  • Application settings
    • 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
    • javascript_flags
    • locale
    • locales_dir_path
    • main_bundle_path
    • debug
    • log_file
    • log_severity
    • multi_threaded_message_loop
    • persist_session_cookies
    • remote_debugging_port
    • resources_dir_path
    • root_cache_path
    • string_encoding
    • uncaught_exception_stack_size
    • unique_request_context_per_browser
    • user_agent
    • windowless_rendering_enabled
  • Browser (object)
    • AddWordToDictionary
    • CanGoBack
    • CanGoForward
    • CloseBrowser
    • CloseDevTools
    • DragTargetDragEnter
    • DragTargetDragOver
    • DragTargetDragLeave
    • DragTargetDrop
    • DragSourceEndedAt
    • DragSourceSystemDragEnded
    • ExecuteFunction
    • ExecuteJavascript
    • Find
    • GetClientCallback
    • GetClientCallbacksDict
    • GetFocusedFrame
    • GetFrameByIdentifier
    • GetFrameByName
    • GetFrameNames
    • GetFrames
    • GetImage
    • GetJavascriptBindings
    • GetMainFrame
    • GetOpenerWindowHandle
    • GetOuterWindowHandle
    • GetSetting
    • GetUrl
    • GetUserData
    • GetWindowHandle
    • GetIdentifier
    • GetZoomLevel
    • GoBack
    • GoForward
    • HasDevTools
    • HasDocument
    • Invalidate
    • IsFullscreen
    • IsPopup
    • IsWindowRenderingDisabled
    • LoadUrl
    • Navigate
    • NotifyMoveOrResizeStarted
    • NotifyScreenInfoChanged
    • ParentWindowWillClose
    • Print
    • Reload
    • ReloadIgnoreCache
    • ReplaceMisspelling
    • SetAutoResizeEnabled
    • SetBounds
    • SendKeyEvent
    • SendMouseClickEvent
    • SendMouseMoveEvent
    • SendMouseWheelEvent
    • SendCaptureLostEvent
    • SetAccessibilityState
    • SetClientCallback
    • SetClientHandler
    • SetFocus
    • SetJavascriptBindings
    • SetUserData
    • SetZoomLevel
    • ShowDevTools
    • StartDownload
    • StopLoad
    • StopFinding
    • ToggleFullscreen
    • TryCloseBrowser
    • WasResized
    • WasHidden
  • Browser settings
    • Font settings
    • background_color
    • databases_disabled
    • default_encoding
    • dom_paste_disabled
    • inherit_client_handlers_for_popups
    • image_load_disabled
    • javascript_disabled
    • javascript_close_windows_disallowed
    • javascript_access_clipboard_disallowed
    • local_storage_disabled
    • remote_fonts_disabled
    • shrink_standalone_images_to_fit
    • tab_to_links_disabled
    • text_area_resize_disabled
    • user_style_sheet_location
    • webgl_disabled
    • windowless_frame_rate
  • Callback (object)
    • Continue
    • Cancel
  • cefpython
    • CreateBrowser
    • CreateBrowserSync
    • ExceptHook
    • GetAppSetting
    • GetAppPath
    • GetBrowserByIdentifier
    • GetBrowserByWindowHandle
    • GetDataUrl
    • GetGlobalClientCallback
    • GetModuleDirectory
    • GetVersion
    • Initialize
    • IsThread
    • LoadCrlSetsFile
    • MessageLoop
    • MessageLoopWork
    • PostTask
    • PostDelayedTask
    • QuitMessageLoop
    • SetGlobalClientCallback
    • SetGlobalClientHandler
    • SetOsModalLoop
    • Shutdown
  • Command line switches
    • enable-media-stream
    • proxy-server
    • no-proxy-server
    • disable-gpu
  • Cookie (class)
    • Set
    • Get
    • SetName
    • GetName
    • SetValue
    • GetValue
    • SetDomain
    • GetDomain
    • SetPath
    • GetPath
    • SetSecure
    • GetSecure
    • SetHttpOnly
    • GetHttpOnly
    • SetCreation
    • GetCreation
    • SetLastAccess
    • GetLastAccess
    • SetHasExpires
    • GetHasExpires
    • SetExpires
    • GetExpires
  • CookieManager (class)
    • GetGlobalManager
    • VisitAllCookies
    • VisitUrlCookies
    • SetCookie
    • DeleteCookies
    • FlushStore
  • CookieVisitor (interface)
    • Visit
  • DisplayHandler (interface)
    • OnAddressChange
    • OnAutoResize
    • OnConsoleMessage
    • OnLoadingProgressChange
    • OnStatusMessage
    • OnTitleChange
    • OnTooltip
  • DownloadHandler
  • DpiAware (class)
    • CalculateWindowSize
    • GetSystemDpi
    • IsProcessDpiAware
    • SetProcessDpiAware
    • Scale
  • DragData (object)
    • IsLink
    • IsFragment
    • GetLinkUrl
    • GetLinkTitle
    • GetFragmentText
    • GetFragmentHtml
    • GetImage
    • GetImageHotspot
    • HasImage
  • FocusHandler (interface)
    • OnTakeFocus
    • OnSetFocus
    • OnGotFocus
  • Frame (object)
    • Copy
    • Cut
    • Delete
    • ExecuteFunction
    • ExecuteJavascript
    • GetBrowser
    • GetParent
    • GetIdentifier
    • GetBrowserIdentifier
    • GetName
    • GetParent
    • GetSource
    • GetText
    • GetUrl
    • IsFocused
    • IsMain
    • IsValid
    • LoadUrl
    • Paste
    • Redo
    • SelectAll
    • Undo
    • ViewSource
  • Image (object)
    • GetAsBitmap
    • GetAsPng
    • GetHeight
    • GetWidth
  • JavascriptBindings (class)
    • __init__
    • IsValueAllowed
    • Rebind
    • SetFunction
    • SetObject
    • SetProperty
  • JavascriptCallback (object)
    • Call
    • GetFrame
    • GetId
    • GetFunctionName
  • JavascriptDialogHandler (interface)
    • Continue
    • OnJavascriptDialog
    • OnBeforeUnloadJavascriptDialog
    • OnResetJavascriptDialogState
    • OnJavascriptDialogClosed
  • KeyboardHandler (interface)
    • OnPreKeyEvent
    • OnKeyEvent
  • LifespanHandler (interface)
    • DoClose
    • _OnAfterCreated
    • OnBeforeClose
    • OnBeforePopup
  • LoadHandler (interface)
    • OnLoadingStateChange
    • OnLoadStart
    • OnDomReady
    • OnLoadEnd
    • OnLoadError
  • Network error
    • ERR_NONE
    • ERR_ABORTED
    • ERR_ACCESS_DENIED
    • ERR_ADDRESS_INVALID
    • ERR_ADDRESS_UNREACHABLE
    • ERR_CACHE_MISS
    • ERR_CERT_AUTHORITY_INVALID
    • ERR_CERT_COMMON_NAME_INVALID
    • ERR_CERT_CONTAINS_ERRORS
    • ERR_CERT_DATE_INVALID
    • ERR_CERT_END
    • ERR_CERT_INVALID
    • ERR_CERT_NO_REVOCATION_MECHANISM
    • ERR_CERT_REVOKED
    • ERR_CERT_UNABLE_TO_CHECK_REVOCATION
    • ERR_CONNECTION_ABORTED
    • ERR_CONNECTION_CLOSED
    • ERR_CONNECTION_FAILED
    • ERR_CONNECTION_REFUSED
    • ERR_CONNECTION_RESET
    • ERR_DISALLOWED_URL_SCHEME
    • ERR_EMPTY_RESPONSE
    • ERR_FAILED
    • ERR_FILE_NOT_FOUND
    • ERR_FILE_TOO_BIG
    • ERR_INSECURE_RESPONSE
    • ERR_INTERNET_DISCONNECTED
    • ERR_INVALID_ARGUMENT
    • ERR_INVALID_CHUNKED_ENCODING
    • ERR_INVALID_HANDLE
    • ERR_INVALID_RESPONSE
    • ERR_INVALID_URL
    • ERR_METHOD_NOT_SUPPORTED
    • ERR_NAME_NOT_RESOLVED
    • ERR_NO_SSL_VERSIONS_ENABLED
    • ERR_NOT_IMPLEMENTED
    • ERR_RESPONSE_HEADERS_TOO_BIG
    • ERR_SSL_CLIENT_AUTH_CERT_NEEDED
    • ERR_SSL_PROTOCOL_ERROR
    • ERR_SSL_RENEGOTIATION_REQUESTED
    • ERR_SSL_VERSION_OR_CIPHER_MISMATCH
    • ERR_TIMED_OUT
    • ERR_TOO_MANY_REDIRECTS
    • ERR_TUNNEL_CONNECTION_FAILED
    • ERR_UNEXPECTED
    • ERR_UNEXPECTED_PROXY_AUTH
    • ERR_UNKNOWN_URL_SCHEME
    • ERR_UNSAFE_PORT
    • ERR_UNSAFE_REDIRECT
  • PaintBuffer (object)
    • GetPointer
    • GetBytes
  • RenderHandler (interface)
    • GetRootScreenRect
    • GetViewRect
    • GetScreenPoint
    • OnPopupShow
    • OnPopupSize
    • OnPaint
    • OnCursorChange
    • OnScrollOffsetChanged
    • OnTextSelectionChanged
    • StartDragging
    • UpdateDragCursor
  • Request (class)
    • CreateRequest
    • GetUrl
    • SetUrl
    • GetMethod
    • SetMethod
    • SetReferrer
    • GetReferrerURL
    • GetReferrerPolicy
    • GetPostData
    • SetPostData
    • GetHeaderMap
    • GetHeaderMultimap
    • SetHeaderMap
    • SetHeaderMultimap
    • GetFlags
    • SetFlags
    • GetFirstPartyForCookies
    • SetFirstPartyForCookies
  • RequestHandler (interface)
    • GetAuthCredentials
    • GetResourceHandler
    • OnBeforeBrowse
    • OnBeforeResourceLoad
    • _OnCertificateError
    • OnResourceRedirect
    • OnResourceResponse
    • OnProtocolExecution
    • OnRendererProcessTerminated
  • ResourceHandler (interface)
    • ProcessRequest
    • GetResponseHeaders
    • ReadResponse
    • Cancel
  • Response (object)
    • IsReadOnly
    • GetStatus
    • SetStatus
    • GetStatusText
    • SetStatusText
    • GetMimeType
    • SetMimeType
    • GetHeaderByName
    • GetHeaderMap
    • GetHeaderMultimap
    • SetHeaderMap
    • SetHeaderMultimap
  • StringVisitor (interface)
    • Visit
  • V8ContextHandler (interface)
    • OnContextCreated
    • OnContextReleased
  • Virtual Key codes
  • WebRequest (class)
    • Create
    • GetRequest
    • GetRequestStatus
    • GetRequestError
    • GetResponse
    • Cancel
  • WebRequestClient (interface)
    • OnUploadProgress
    • OnDownloadProgress
    • OnDownloadData
    • OnRequestComplete
  • WindowInfo (class)
    • SetAsChild
    • SetAsPopup
    • SetAsOffscreen
  • WindowUtils (class)
    • OnSetFocus
    • OnSize
    • OnEraseBackground
    • SetTitle
    • SetIcon
    • GetParentHandle
    • IsWindowHandle
    • gtk_plug_new
    • gtk_widget_show
    • InstallX11ErrorHandlers

About

Python bindings for the Chromium Embedded Framework (CEF)

Topics

cefcefpythonchromechromiumcross-platform-guigui-frameworkgui-toolkitpython

Resources

Readme
License

Contributing

Contributing
Activity

Stars

3.2k stars

Watchers

121 watching

Forks

477 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.