CEF Python,一个基于HTML 5的Python GUI框架

网友投稿 2238 2022-10-26

CEF python,一个基于HTML 5的Python GUI框架

CEF Python,一个基于HTML 5的Python GUI框架

CEF Python

Table of contents:

IntroductionSponsorsInstallTutorialExamplesSupportReleasesNext releaseLatest releasev49 release (WinXP/Vista)v31 release (old systems) Support developmentThanks to sponsorsThanks to all Seeking new sponsorsOther READMEsQuick links

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 applicationRender web content off-screen in applications that use custom drawing frameworksUse it for automated testing of web applications with more advanced capabilities than Selenium web browser automation due to CEF low level programming APIsUse 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.

Sponsors

Install

You can install pypi/cefpython3 package using pip tool. On Linux pip 8.1+ is required. You can also download packages for offline installation available on the GitHub Releases pages. Command to install with pip:

pip install cefpython3==66.0

Tutorial

See the Tutorial.md document.

Examples

See the README-examples.md and README-snippets.md documents.

Support

Ask questions and report problems on the ForumSupported examples are listed in the README-examples.md fileDocumentation is in the docs/ directory: Build instructionsContributing codeKnowledge BaseMigration guideTutorial API reference is in the api/ directory: API categoriesAPI index Additional documentation is available in Issues labelled Knowledge BaseTo search documentation use GitHub "This repository" search at the top. To narrow results to documentation only select "Markdown" in the right pane.You can vote on issues in the tracker to let us know which issues are important to you. To do that add a +1 thumb up reaction to the first post in the issue. See Most popular issues sorted by reactions.Wiki pages are deprecated and for v31 only

Releases

Information on planned new and current releases, supported platforms, python versions, architectures and requirements. If you want to support old operating systems then choose the v31 release.

Next release

To see planned new features or bugs to be fixed in the near future in one of next releases, see the next release label in the trackerTo see planned new features or bugs to be fixed in further future, see the next release 2 label in the tracker

Latest release

OSPy2Py332bit64bitRequirements
Windows2.73.4 / 3.5 / 3.6 / 3.7YesYesWindows 7+
Linux2.73.4 / 3.5 / 3.6 / 3.7YesYesDebian 8+, Ubuntu 14.04+,
Fedora 24+, openSUSE 13.3+
Mac2.73.4 / 3.5 / 3.6 / 3.7NoYesMacOS 10.9+

These platforms are not supported yet:

ARM - see Issue #267Android - see Issue #307

v49 release (WinXP/Vista)

OSPy2Py332bit64bitRequirements
Windows2.73.4YesYesWindows XP+

Install with command: pip --no-cache-dir install cefpython3==49.0. Please note that if you were previously installing cefpython3 package it is required to use the --no-cache-dir flag, otherwise pip will end up with error message No matching distribution found for cefpython3==49.0. This happens because 49.0 release occured after 57.0 and 66.0 releases. Downloads are available on GitHub Releases tagged v49.0.See Migration guide document for changes in this releaseDocumentation is available in the docs/ directory in the cefpython49-winxp branchAPI reference is available in the api/ directory in the cefpython49-winxp branch

v31 release (old systems)

OSPy2Py332bit64bitRequirements
Windows2.7NoYesYesWindows XP+
Linux2.7NoYesYesDebian 7+ / Ubuntu 12.04+
Mac2.7NoYesYesMacOS 10.7+

Additional information for v31.2 release:

On Windows/Mac you can install with command: pip install cefpython3==31.2Downloads are available on wiki pages and on GitHub Releases tagged v31.2.Documentation is on wiki pagesAPI reference is available in revision 169a1b2

Support development

If you would like to support general CEF Python development efforts by making a donation then please click the Paypal Donate button below. If you would like to see a specific feature implemented then you can make a comment about that when making a donation and that will give it a higher priority.

Thanks to sponsors

Thanks to all

[2018] Thanks to Fivestars for sponsoring the v49 release for legacy systems (WinXP/Vista)[2018] Many thanks to Lampix for sponsoring the v66 release for all platforms[2017] Many thanks to ClearChat Inc. for sponsoring the v55/v56 releases for all platforms[2016-2018] Thanks to JetBrains for providing an Open Source license for PyCharm[2014] Thanks to Adam Duston for donating a Macbook to aid the development of Mac port[2013-2015] Lots of thanks goes to Cyan Inc. for sponsoring this project for a long time, making CEF Python 3 mature[2013] Thanks to Rentouch GmbH for sponsoring the development of the off-screen rendering support[2013] Thanks to Thomas Wusatiuk for sponsoring the development of the web response reading features[2012-2018] Thanks to those who have made a Paypal donation: Rentouch GmbH, Walter Purvis, Rokas Stupuras, Alex Rattray, Greg Kacy, Paul Korzhyk, Tomasz Tomanek.[2012-2017] Thanks to those who have donated their time through code contributions, they are listed in the Authors file

Seeking new sponsors

CEF Python is seeking companies to sponsor further development of the project. There are many proposals for new features submitted in the issue tracker. Most notable are:

Monthly releases with latest ChromiumAn automated build system similar to upstream CEF Spotify Automated BuildsARM and Android supportMulti-threaded support for increased performanceProprietary codecs support in build tools: H264, H265,AC3, EAC3, MPEG-4More CEF API exposed, only about 50% is exposed so farHundreds of new settings and Chromium preferences not yet exposedEasier integration with popular GUI toolkits in just a few lines of code and support for more third party GUI frameworksMore examples of implementing various advanced features and more snippets as well

If your company would like to sponsor CEF Python development efforts then please contact Czarek. Long term sponsorships are welcome and Czarek is open to ideas about the project. He would love to spend more time on developing this project, but he can't afford doing so in his free time. Currently there is no company supporting this project actively on a daily basis.

Other READMEs

PyInstaller packager

Quick links

Docs

Build instructionsKnowledge BaseMigration guideTutorial

API categories

Modules

cefpython module

Settings

ApplicationSettings dictionaryBrowserSettings dictionaryCommandLineSwitches dictionary

Classes and objects

Browser objectCallback objectCookie classCookieManager classDpiAware class (Win)DragData objectFrame objectImage objectJavascriptBindings classJavascriptCallback objectPaintBuffer objectRequest classResponse objectWebPluginInfo objectWebRequest classWindowInfo classWindowUtils class

Client handlers (interfaces)

AccessibilityHandlerDisplayHandlerDownloadHandlerFocusHandlerJavascriptDialogHandlerKeyboardHandlerLifespanHandlerLoadHandlerRenderHandlerRequestHandlerResourceHandlerV8ContextHandler

Other interfaces

CookieVisitor interfaceStringVisitor interfaceWebRequestClient interface

API index

AccessibilityHandler (interface)_OnAccessibilityTreeChange_OnAccessibilityLocationChange Application settingsaccept_language_listapp_user_model_idauto_zoomingbackground_colorbrowser_subprocess_pathcache_pathcommand_line_args_disabledcontext_menudownloads_enabledexternal_message_pumpframework_dir_pathignore_certificate_errorsjavascript_flagslocalelocales_dir_pathdebuglog_filelog_severitymulti_threaded_message_loopnet_security_expiration_enabledpack_loading_disabledpersist_session_cookiespersist_user_preferencesproduct_versionremote_debugging_portresources_dir_pathsingle_processstring_encodinguncaught_exception_stack_sizeunique_request_context_per_browseruser_agentuser_data_pathwindowless_rendering_enabled Browser (object)AddWordToDictionaryCanGoBackCanGoForwardCloseBrowserCloseDevToolsDragTargetDragEnterDragTargetDragOverDragTargetDragLeaveDragTargetDropDragSourceEndedAtDragSourceSystemDragEndedExecuteFunctionExecuteJavascriptFindGetClientCallbackGetClientCallbacksDictGetFocusedFrameGetFrameGetFrameByIdentifierGetFramesGetFrameCountGetFrameIdentifiersGetFrameNamesGetImageGetJavascriptBindingsGetMainFrameGetNSTextInputContextGetOpenerWindowHandleGetOuterWindowHandleGetSettingGetUrlGetUserDataGetWindowHandleGetIdentifierGetZoomLevelGoBackGoForwardHandleKeyEventAfterTextInputClientHandleKeyEventBeforeTextInputClientHasDevToolsHasDocumentInvalidateIsFullscreenIsLoadingIsMouseCursorChangeDisabledIsPopupIsWindowRenderingDisabledLoadUrlNavigateNotifyMoveOrResizeStartedNotifyScreenInfoChangedParentWindowWillClosePrintReloadReloadIgnoreCacheReplaceMisspellingSetAutoResizeEnabledSetBoundsSendKeyEventSendMouseClickEventSendMouseMoveEventSendMouseWheelEventSendFocusEventSendCaptureLostEventSetAccessibilityStateSetClientCallbackSetClientHandlerSetFocusSetMouseCursorChangeDisabledSetJavascriptBindingsSetUserDataSetZoomLevelShowDevToolsStartDownloadStopLoadStopFindingToggleFullscreenTryCloseBrowserWasResizedWasHidden Browser settingsFont settingsaccept_language_listapplication_cache_disabledbackground_colordatabases_disableddefault_encodingdom_paste_disabledfile_access_from_file_urls_allowedinherit_client_handlers_for_popupsimage_load_disabledjavascript_disabledjavascript_close_windows_disallowedjavascript_access_clipboard_disallowedlocal_storage_disabledplugins_disabledremote_fontsshrink_standalone_images_to_fittab_to_links_disabledtext_area_resize_disableduniversal_access_from_file_urls_alloweduser_style_sheet_locationweb_security_disabledwebgl_disabledwindowless_frame_rate Callback (object)ContinueCancel cefpythonCreateBrowserCreateBrowserSyncExceptHookGetAppSettingGetAppPathGetBrowserByIdentifierGetBrowserByWindowHandleGetCommandLineSwitchGetDataUrlGetGlobalClientCallbackGetModuleDirectoryGetVersionInitializeIsThreadLoadCrlSetsFileMessageLoopMessageLoopWorkPostTaskPostDelayedTaskQuitMessageLoopSetGlobalClientCallbackSetGlobalClientHandlerSetOsModalLoopShutdown Command line switchesenable-media-streamproxy-serverno-proxy-serverdisable-gpu Cookie (class)SetGetSetNameGetNameSetValueGetValueSetDomainGetDomainSetPathGetPathSetSecureGetSecureSetHttpOnlyGetHttpOnlySetCreationGetCreationSetLastAccessGetLastAccessSetHasExpiresGetHasExpiresSetExpiresGetExpires CookieManager (class)GetGlobalManagerGetBlockingManagerCreateManagerSetSupportedSchemesVisitAllCookiesVisitUrlCookiesSetCookieDeleteCookiesSetStoragePathFlushStore CookieVisitor (interface)Visit DisplayHandler (interface)OnAddressChangeOnAutoResizeOnConsoleMessageOnLoadingProgressChangeOnStatusMessageOnTitleChangeOnTooltip DownloadHandlerDpiAware (class)CalculateWindowSizeEnableHighDpiSupportGetSystemDpiIsProcessDpiAwareSetProcessDpiAwareScale DragData (object)IsLinkIsFragmentGetLinkUrlGetLinkTitleGetFragmentTextGetFragmentHtmlGetImageGetImageHotspotHasImage FocusHandler (interface)OnTakeFocusOnSetFocusOnGotFocus Frame (object)CopyCutDeleteExecuteFunctionExecuteJavascriptGetBrowserGetParentGetIdentifierGetBrowserIdentifierGetNameGetParentGetSourceGetTextGetUrlIsFocusedIsMainIsValidLoadStringLoadUrlPasteRedoSelectAllUndoViewSource Image (object)GetAsBitmapGetAsPngGetHeightGetWidth JavascriptBindings (class)__init__IsValueAllowedRebindSetFunctionSetObjectSetProperty JavascriptCallback (object)CallGetFrameGetIdGetFunctionName JavascriptDialogHandler (interface)ContinueOnJavascriptDialogOnBeforeUnloadJavascriptDialogOnResetJavascriptDialogStateOnJavascriptDialogClosed KeyboardHandler (interface)OnPreKeyEventOnKeyEvent LifespanHandler (interface)DoClose_OnAfterCreatedOnBeforeCloseOnBeforePopup LoadHandler (interface)OnLoadingStateChangeOnLoadStartOnDomReadyOnLoadEndOnLoadError Network errorERR_NONEERR_ABORTEDERR_ACCESS_DENIEDERR_ADDRESS_INVALIDERR_ADDRESS_UNREACHABLEERR_CACHE_MISSERR_CERT_AUTHORITY_INVALIDERR_CERT_COMMON_NAME_INVALIDERR_CERT_CONTAINS_ERRORSERR_CERT_DATE_INVALIDERR_CERT_ENDERR_CERT_INVALIDERR_CERT_NO_REVOCATION_MECHANISMERR_CERT_REVOKEDERR_CERT_UNABLE_TO_CHECK_REVOCATIONERR_CONNECTION_ABORTEDERR_CONNECTION_CLOSEDERR_CONNECTION_FAILEDERR_CONNECTION_REFUSEDERR_CONNECTION_RESETERR_DISALLOWED_URL_SCHEMEERR_EMPTY_RESPONSEERR_FAILEDERR_FILE_NOT_FOUNDERR_FILE_TOO_BIGERR_INSECURE_RESPONSEERR_INTERNET_DISCONNECTEDERR_INVALID_ARGUMENTERR_INVALID_CHUNKED_ENCODINGERR_INVALID_HANDLEERR_INVALID_RESPONSEERR_INVALID_URLERR_METHOD_NOT_SUPPORTEDERR_NAME_NOT_RESOLVEDERR_NO_SSL_VERSIONS_ENABLEDERR_NOT_IMPLEMENTEDERR_RESPONSE_HEADERS_TOO_BIGERR_SSL_CLIENT_AUTH_CERT_NEEDEDERR_SSL_PROTOCOL_ERRORERR_SSL_RENEGOTIATION_REQUESTEDERR_SSL_VERSION_OR_CIPHER_MISMATCHERR_TIMED_OUTERR_TOO_MANY_REDIRECTSERR_TUNNEL_CONNECTION_FAILEDERR_UNEXPECTEDERR_UNEXPECTED_PROXY_AUTHERR_UNKNOWN_URL_SCHEMEERR_UNSAFE_PORTERR_UNSAFE_REDIRECT PaintBuffer (object)GetIntPointerGetBytes RenderHandler (interface)GetRootScreenRectGetViewRectGetScreenRectGetScreenPointOnPopupShowOnPopupSizeOnPaintOnCursorChangeOnScrollOffsetChangedOnTextSelectionChangedStartDraggingUpdateDragCursor Request (class)CreateRequestIsReadOnlyGetUrlSetUrlGetMethodSetMethodGetPostDataSetPostDataGetHeaderMapGetHeaderMultimapSetHeaderMapSetHeaderMultimapGetFlagsSetFlagsGetFirstPartyForCookiesSetFirstPartyForCookiesGetResourceTypeGetTransitionType RequestHandler (interface)CanGetCookiesCanSetCookieGetAuthCredentialsGetCookieManagerGetResourceHandlerOnBeforeBrowse_OnBeforePluginLoadOnBeforeResourceLoad_OnCertificateErrorOnQuotaRequestOnResourceRedirectOnResourceResponseOnPluginCrashedOnProtocolExecutionOnRendererProcessTerminated ResourceHandler (interface)ProcessRequestGetResponseHeadersReadResponseCanGetCookieCanSetCookieCancel Response (object)IsReadOnlyGetStatusSetStatusGetStatusTextSetStatusTextGetMimeTypeSetMimeTypeGetHeaderGetHeaderMapGetHeaderMultimapSetHeaderMapSetHeaderMultimap StringVisitor (interface)Visit V8ContextHandler (interface)OnContextCreatedOnContextReleased Virtual Key codesWebPluginInfo (object)GetNameGetPathGetVersionGetDescription WebRequest (class)CreateGetRequestGetRequestStatusGetRequestErrorGetResponseCancel WebRequestClient (interface)OnUploadProgressOnDownloadProgressOnDownloadDataOnRequestComplete WindowInfo (class)SetAsChildSetAsPopupSetAsOffscreen WindowUtils (class)OnSetFocus OnSize OnEraseBackground SetTitle SetIcon GetParentHandleIsWindowHandlegtk_plug_new gtk_widget_show InstallX11ErrorHandlers

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:I/O代码实践
下一篇:39. 组合总和
相关文章

 发表评论

暂时没有评论,来抢沙发吧~