Skip to content

Hyuto/pywebview-react-flask

Repository files navigation

Pywebview-React-Flask Template

python pywebview React Flask

Simple Pywebview application using React for the frontend and Flask to handle the backend.

Supported Platforms

Platforms Tested
Windows
Linux [Debian based]

Setup

Clone this repo and run this commands on your terminal

yarn run init

that will install all dependencies to run the app.

Note : Please refer to installation guide and make sure all dependencies are set to run pywebview application.

Start the Application

On your terminal run this command

yarn start

Note : This template only support hot reload to apply changes in your frontend code you need but any changes on app/backend code you need to close and run the app again.

Build the Application

Build the application using this command

yarn build

This will build the application to production on publish directory.

Note : Please make sure to set

DEBUG = FALSE

in main.py before deploying the app for production.

React Application

Serve React

Run this command to build serve react application.

yarn react-serve

Build React

Run this command to build react (frontend) application only.

yarn react-build

This will build the react application to production on dist directory.

Linting

Code linting, use eslint to lint your react code and flake8 to lint your python code.

react-lint

Run this command to lint your react code.

yarn react-lint

python-lint

Run this command to lint your python code.

yarn python-lint

Install Additional Python Dependencies

Run this command install additional python dependencies.

yarn install-dep <dependency_1> <dependency_2>

That command will call pip inside pywebview venv to install python .

About

PyWebView-React-Flask Template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published