PyHub integrates a Flask backend π§ with an Electron frontend β‘ to create a seamless, cross-platform application that works both in-browser and as a desktop app. This setup allows you to leverage the power of Python π for backend processing and JavaScript π» for a dynamic user interface.
Before diving in, ensure you have the following installed:
- Python 3.x - for the backend logic
- Node.js and npm - for managing the Electron application
- Yarn (optional) - for faster and reliable dependency management
π₯ Latest Python Download Links (Click to expand) β¬οΈ
| Release Type | Version | Release Date | Download Links |
|---|---|---|---|
| Latest Release | Python 3.13.0 | Oct. 7, 2024 | Installer (64-bit), Installer (32-bit), Installer (ARM64), Embeddable Package (64-bit), Embeddable Package (32-bit), Embeddable Package (ARM64) |
| Stable Release | Python 3.12.7 | Oct. 1, 2024 | Installer (64-bit), Installer (32-bit), Installer (ARM64), Embeddable Package (64-bit), Embeddable Package (32-bit), Embeddable Package (ARM64) |
| Pre-release | Python 3.14.0a1 | Oct. 15, 2024 | Installer (64-bit), Installer (32-bit), Installer (ARM64), Embeddable Package (64-bit), Embeddable Package (32-bit), Embeddable Package (ARM64) |
π macOS Download Links (Click to expand) β¬οΈ
| Release Type | Version | Release Date | Download Links |
|---|---|---|---|
| Latest Release | Python 3.13.0 | Oct. 7, 2024 | macOS 64-bit universal2 installer |
| Stable Release | Python 3.12.7 | Oct. 1, 2024 | macOS 64-bit universal2 installer |
| Pre-release | Python 3.14.0a1 | Oct. 15, 2024 | macOS 64-bit universal2 installer |
βοΈ Package Manager Commands (Click to expand) β¬οΈ
| Package Manager | Command |
|---|---|
| winget | winget install Python.Python.3 |
| Homebrew (macOS) | brew install python |
| apt (Debian/Ubuntu) | sudo apt update && sudo apt install python3 |
| pacman (Arch Linux) | sudo pacman -S python |
π Installation Guides (Click to expand) β¬οΈ
| Tool | Installation Guide |
|---|---|
| Python | Download and install the latest version of Python. |
| pip | Install pip, the Python package manager. |
| Node.js & npm | Install Node.js and npm. |
| Yarn (Optional) | Install Yarn for a smoother dependency management experience. |
- Clone the repository and navigate to the project directory.
git clone https://github.com/rxElectron/PyHub.git cd pyhub - Install the required Python dependencies:
pip install -r requirements.txt
- Navigate to the
electron_appdirectory:cd electron_app - Install the necessary Electron dependencies:
npm install # or yarn install
Run the Flask server by executing:
python app.pyOnce the backend is running, you have two options for the frontend:
- Browser Mode: Open your browser and navigate to the URL shown in the terminal.
- Electron App Mode: Run the Electron app by selecting "Yes" when prompted in the dialog or by executing the start command within the
electron_appdirectory:npm start # or yarn start
- π₯ Flask Backend: Handles REST API endpoints, data processing, and template serving.
- π» Electron Frontend: Wraps the web application in a desktop environment, providing access to native features.
- π¦ Modular Architecture: Each feature, such as debugging and exploring, has its own dedicated route and component, making the app more maintainable and scalable.
The Debug Module helps you troubleshoot issues effectively, offering:
- Logging & Error Tracking: View application logs and errors.
- Performance Profiling: Analyze performance bottlenecks.
- Variable Inspection & Breakpoint Management: Dive into variable values and control the flow.
To access these features, simply navigate to the Debug section within the app interface.
Thanks to all the contributors and open-source libraries that made this project possible. Special shoutout to the developers of Flask and Electron for enabling rapid cross-platform development!
To manage Node.js versions, you can use nvm (Node Version Manager) or fnm (Fast Node Manager). Below are instructions for setting up both tools on different systems.
- Install nvm (Node Version Manager):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash - Download and install Node.js (you may need to restart the terminal):
nvm install 22
- Verify the installed Node.js and npm versions:
node -v # should print `v22.11.0` npm -v # should print `10.9.0`
- Install fnm:
curl -fsSL https://fnm.vercel.app/install | bash - Activate fnm:
source ~/.bashrc
- Download and install Node.js:
fnm use --install-if-missing 22
- Verify the installed Node.js and npm versions:
node -v # should print `v22.11.0` npm -v # should print `10.9.0`
- Install fnm via winget:
winget install Schniz.fnm
- Configure fnm environment:
fnm env --use-on-cd | Out-String | Invoke-Expression
- Download and install Node.js:
fnm use --install-if-missing 22
- Verify the installed Node.js and npm versions:
node -v # should print `v22.11.0` npm -v # should print `10.9.0`
Before using Yarn, ensure it is installed on your system. There are multiple ways to install Yarn:
The recommended way to install Yarn is through npm:
npm install --global yarn| Operating System | Installation Method |
|---|---|
| Arch Linux | pacman -S yarn |
| Windows | Use Chocolatey (choco install yarn), Scoop (scoop install yarn), or download the installer. |
| macOS | Use Homebrew (brew install yarn), MacPorts (sudo port install yarn), or installation script. |
To verify if Yarn is installed correctly, run:
yarn --versionIf Yarn is not found in your PATH, add the following to your profile (e.g., .bashrc, .zshrc):
export PATH="$PATH:/opt/yarn-[version]/bin"For Fish shell users:
set -U fish_user_paths (yarn global bin) $fish_user_pathsIf your Python environment does not have pip installed, you can use one of the following methods:
- Linux/macOS:
python -m ensurepip --upgrade
- Windows:
py -m ensurepip --upgrade
- Download the script from get-pip.py.
- Run the script in the terminal:
- Windows:
py get-pip.py
- Windows:
To upgrade pip, run:
python -m pip install --upgrade pipThis project is licensed under the MIT License - see the LICENSE-MIT file for details.
