cra-template-electron-python-fastapi

1.0.1 • Public • Published

cra-template-electron-python-fastapi

This is a create-react-app (CRA) template for Electron-Python applications based on the official base template for Create React App.

Getting Started

Note that Python >3.6 is required for development.

To create a React-Electron-Python application and run it in dev mode, run:

npx create-react-app my-app --template electron-python-fastapi
cd my-app
python -m pip install virtualenv
python -m virtualenv venv
.\venv\Scripts\activate
python -m pip install -r requirements.txt
npm start

These commands will do the following:

  1. Create a React-Electron-Python application called my-app using the CRA electron-python-fastapi template.
  2. Change the current directory to my-app
  3. Launch the application in dev mode, with hot reloading and the Developer tools console installed with React DevTools extension

For more information on how to use CRA, see the Create React App docs.

Distribution

This template uses electron-builder to package and build a ready for distribution application for Windows, macOS and Linux.

To build the application, run:

npm run dist:win
npm run dist:mac
npm run dist:linux

These commands will generate distributables for Windows, macOS and Linux respectively. By default, the distributables will be in NSIS (Windows), dmg (macOS) and deb (linux) form.

Remember to change the author, description, build.appId and build.productName in package.json before creating a distributable

React-Electron

For creating an application with only React and Electron, use the CRA electron-builder template.

npx create-react-app my-app --template electron-builder
cd my-app
npm start

Package Sidebar

Install

npm i cra-template-electron-python-fastapi

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

46.7 kB

Total Files

27

Last publish

Collaborators

  • jlkp001