| 39 |
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <ul class="sidebar-links"><li><a href="/3.7/examples/cef.html" class="sidebar-link">CEF support</a></li><li><a href="/3.7/examples/change_url.html" class="sidebar-link">Change URL</a></li><li><a href="/3.7/examples/css_load.html" class="sidebar-link">CSS load</a></li><li><a href="/3.7/examples/close_confirm.html" class="sidebar-link">Quit confirmation dialog</a></li><li><a href="/3.7/examples/debug.html" class="sidebar-link">Debugging</a></li><li><a href="/3.7/examples/destroy_window.html" class="sidebar-link">Destroy window</a></li><li><a href="/3.7/examples/events.html" class="sidebar-link">Events</a></li><li><a href="/3.7/examples/frameless.html" class="sidebar-link">Frameless window</a></li><li><a href="/3.7/examples/fullscreen.html" class="sidebar-link">Fullscreen window</a></li><li><a href="/3.7/examples/get_elements.html" class="sidebar-link">Get DOM elements</a></li><li><a href="/3.7/examples/get_current_url.html" class="sidebar-link">Get current URL</a></li><li><a href="/3.7/examples/hide_window.html" class="sidebar-link">Hide / show window</a></li><li><a href="/3.7/examples/html_load.html" class="sidebar-link">HTML load</a></li><li><a href="/3.7/examples/js_evaluate.html" class="sidebar-link">Javascript evaluation</a></li><li><a href="/3.7/examples/js_api.html" class="sidebar-link">Javascript API</a></li><li><a href="/3.7/examples/loading_animation.html" class="sidebar-link">Loading animation</a></li><li><a href="/3.7/examples/links.html" class="sidebar-link">Link types</a></li><li><a href="/3.7/examples/localization.html" class="sidebar-link">Localization</a></li><li><a href="/3.7/examples/min_size.html" class="sidebar-link">Minimum window size</a></li><li><a href="/3.7/examples/minimize_window.html" class="sidebar-link">Minimize / restore window</a></li><li><a href="/3.7/examples/move_window.html" class="sidebar-link">Move window</a></li><li><a href="/3.7/examples/multiple_windows.html" class="sidebar-link">Multi-window</a></li><li><a href="/3.7/examples/open_file_dialog.html" class="sidebar-link">Open file dialog</a></li><li><a href="/3.7/examples/open_url.html" class="sidebar-link">Open URL</a></li><li><a href="/3.7/examples/resize_window.html" class="sidebar-link">Resize window</a></li><li><a href="/3.7/examples/save_file_dialog.html" class="sidebar-link">Save file dialog</a></li><li><a href="/3.7/examples/screens.html" class="sidebar-link">Screens</a></li><li><a href="/3.7/examples/toggle_fullscreen.html" class="sidebar-link">Toggle full-screen</a></li><li><a href="/3.7/examples/user_agent.html" class="sidebar-link">Change user agent string</a></li><li><a href="/3.7/examples/window_title_change.html" class="sidebar-link">Window title change</a></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="examples"><a href="#examples" class="header-anchor">#</a> Examples</h1> <p>You can find examples demonstrating features of <em>pywebview</em> in the sidebar.</p> <p>Below there are a couple of non-trivial examples that demonstrate an application architecture.</p> <h2 id="react-boilerplate"><a href="#react-boilerplate" class="header-anchor">#</a> React Boilerplate</h2> <p><a href="https://github.com/r0x0r/pywebview-react-boilerplate" target="_blank" rel="noopener noreferrer">React boilerplate with parcel-bundler<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>. A complete React-based boilerplate with installation, usage and building taken care of out of the box.</p> <p><a href="https://github.com/dzc0d3r/pywebview-react-boilerplate/" target="_blank" rel="noopener noreferrer">React boilerplate with create-react-app<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>. A complete React-based boilerplate with installation, usage and building taken care of out of the box.</p> <h2 id="serverless-application"><a href="#serverless-application" class="header-anchor">#</a> Serverless application</h2> <p><a href="https://github.com/r0x0r/pywebview/tree/docs/examples/todos" target="_blank" rel="noopener noreferrer">Serverless application<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p>A simple todo application that uses serverless architecture. Communication between frontend and backend is provided by built-in API.</p> <div class="gallery"><div><img src="/screenshots/todos-windows.png" alt="Windows" class="zoom"> <h4>Windows</h4></div> <div><img src="/screenshots/todos-macos.png" alt="macOS" class="zoom"> <h4>macOS</h4></div> <div><img src="/screenshots/todos-linux.png" alt="Linux" class="zoom"> <h4>Linux</h4></div></div> <h2 id="http-server-application"><a href="#http-server-application" class="header-anchor">#</a> HTTP server application</h2> <p><a href="https://github.com/r0x0r/pywebview/tree/docs/examples/flask_app" target="_blank" rel="noopener noreferrer">Flask-based application<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p>In this example communication between frontend and backend is facilitated by a Flask server.</p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/r0x0r/pywebview/edit/docs/docs/examples/README.md" target="_blank" rel="noopener noreferrer">Help us improve this page!</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----></footer> <!----> </main></div><div class="global-ui"></div></div> |