Skip to content

Automates Python environment setup and app packaging by creating a virtual environment, installing dependencies, configuring Playwright for web automation, and preparing Python scripts for executable conversion with auto-py-to-exe.

License

Notifications You must be signed in to change notification settings

A-Assuncao/playwright-to-exe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

playwright-to-exe

This tool automates the setup process to transform Python files that use the Playwright library into a onefile executable for Windows (.exe). It creates a virtual environment, installs dependencies from requirements.txt, packages Chromium with your application, configures the Playwright PATH for executable conversion, and initiates auto-py-to-exe.

How to Use

Follow these steps to easily convert your Python scripts into standalone executables:

Step 1: Preparation

Right-click here and select "Save link as..." to download the requirements.txt file. Choose the empty directory where you wish to save it.

Step 2: Configure Dependencies

  1. Edit the requirements.txt file by adding any additional libraries your project requires under section "2";
  2. Save the file after editing.

IMPORTANT: Do not remove section "1".

Step 3: Open PowerShell

Navigate to the empty folder where you saved the requirements.txt file in step "1" and open PowerShell in that location.

Step 4: Run the Installation Command

Paste the following command into PowerShell and execute it:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex "&{$((New-Object System.Net.WebClient).DownloadString('https://github.com/raw/A-Assuncao/playwright-to-exe/main/setup_install_venv.ps1'))}"

Credits

This solution was inspired by a step-by-step guide created by Animesh Singh on Medium.com. You can read the original guide here. Many thanks to Animesh Singh for providing the detailed instructions that formed the basis for this automated process!

About

Automates Python environment setup and app packaging by creating a virtual environment, installing dependencies, configuring Playwright for web automation, and preparing Python scripts for executable conversion with auto-py-to-exe.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published