Turn your Python scripts into proper Windows apps - venv-aware shortcuts with taskbar pinning
Project description
pynstall
Turn your Python scripts into proper Windows apps.
Live source execution - your code runs from the actual .py files, not a frozen bundle. git pull and reopen = instant update. No rebuild, no redistribution.
Features
- Venv-aware - Automatically finds and uses your project's virtual environment
- Taskbar-friendly - Sets AppUserModelID so pinned icons group correctly
- No bundling - Unlike PyInstaller, your code stays live and editable
- Console hiding - GUI apps launch without a console window (uses
pythonw.exe) - Custom icons - Use your own
.icofile for the shortcut
Installation
pip install pynstall
For full taskbar pinning support (recommended):
pip install pynstall[appid]
Quick Start
Option 1: Configure in pyproject.toml
Add to your pyproject.toml:
[tool.pynstall]
name = "My App"
entry = "myapp.main" # module path or "main.py" for scripts
icon = "assets/icon.ico" # optional
Then run:
pynstall install
Option 2: Command-line only
pynstall install --name "My App" --entry myapp.main --icon ./icon.ico
Usage
Install
# From pyproject.toml config
pynstall install
# With explicit options
pynstall install --name "My App" --entry myapp.main
# Desktop + Start Menu
pynstall install --start-menu
# For console apps (show terminal window)
pynstall install --console
Uninstall
# From pyproject.toml config
pynstall uninstall
# With explicit name
pynstall uninstall --name "My App"
Configuration Options
pyproject.toml
[tool.pynstall]
name = "My App" # Required: display name
entry = "myapp.main" # Required: module path or script.py
icon = "assets/icon.ico" # Optional: custom icon
venv = "venv" # Optional: venv path (auto-detected)
desktop = true # Optional: create desktop shortcut (default: true)
start_menu = false # Optional: create Start Menu entry (default: false)
appid = "Company.App.1.0" # Optional: custom AppUserModelID (auto-generated)
console = false # Optional: show console window (default: false)
Command-line
pynstall install [OPTIONS]
Options:
-n, --name TEXT Display name for the application
-e, --entry TEXT Entry point - module or script
-i, --icon TEXT Path to .ico file
--venv TEXT Virtual environment path
--desktop / --no-desktop Create desktop shortcut (default: yes)
--start-menu Create Start Menu entry
--appid TEXT Windows AppUserModelID
--console / --no-console Show console window (default: no)
-d, --project-dir PATH Project directory
Python API
from pynstall import install_app, uninstall_app
# Install
result = install_app(
name="My App",
entry="myapp.main",
icon="assets/icon.ico",
desktop=True,
start_menu=True,
)
if result.success:
print(f"Installed to: {result.desktop_shortcut}")
# Uninstall
uninstall_app(name="My App")
How It Works
pynstall creates a Windows shortcut that:
- Points to
pythonw.exein your venv (no console window for GUI apps) - Runs your entry point with
-m module.pathor direct script path - Sets the working directory to your project root
- Includes a custom AppUserModelID for proper taskbar grouping
Because the shortcut runs your actual source files:
- Edit code → reopen app → see changes immediately
git pull→ reopen app → instant update- No frozen executables, no rebuild step
Requirements
- Windows (macOS/Linux support planned)
- Python 3.9+
- A virtual environment in your project
Optional Dependencies
pywin32- Required for AppUserModelID support (proper taskbar pinning)- Without it, shortcuts still work but may show duplicate icons when pinned
- Install with:
pip install pynstall[appid]
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pynstall-0.1.0.tar.gz.
File metadata
- Download URL: pynstall-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bed69992b2562eee3799d0d2422cfac4624e24e4ac91d6e95e602574aa23814
|
|
| MD5 |
54773e5035d740e7b494912e2e93be39
|
|
| BLAKE2b-256 |
650a61ffc6e11ce24a34bee6f944bd1b98c9e0bd62f5ffc2f55f08b8e7fad639
|
File details
Details for the file pynstall-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pynstall-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91cc50b9f3e8e481689429edeb21ec142b5585c852865ae0da85d07387c7d6b
|
|
| MD5 |
8af414d25b961e86cd9266911eea12b6
|
|
| BLAKE2b-256 |
b75f510b410fd5bf04ef2cec88b507515173e5685c483f7ef6cf92ff418d4a79
|