Python packaging made human — init, build, and deploy from one GUI or CLI.
Project description
PiPnDeploy
Python packaging made human — initialise, build, version, and deploy Python packages from one CLI or GUI.
What it does
PiPnDeploy wraps the Python packaging workflow — pyproject.toml generation, dependency detection, building, version bumping, and PyPI upload — into a single tool with both a desktop GUI and a CLI.
It is designed for solo developers and small teams who want to stop copy-pasting packaging boilerplate between projects.
Features
- Init — generate a PEP 621-compliant
pyproject.tomlfrom a form or a single command - Surgical update — edit only the fields you own;
[tool.ruff],[tool.pytest],[tool.hatch], comments, and custom sections are never touched - Dependency detection — AST scan your package folder; stdlib and self-imports are excluded automatically; supports flat,
src/, and multi-package layouts - Build — wraps
python -m buildwith a pre-build hook gate - Deploy — wraps
twine uploadwith a pre-flight auth check so it never hangs waiting for interactive input - Version bump — patch / minor / major from the GUI version tab or
pipndeploy bump - Clean — removes build artefacts; uninstall is always opt-in
- Auth check — validates
~/.pypirctoken configuration before attempting upload - Lifecycle hooks —
hooks/pre_build.pyandhooks/post_deploy.pywith correct lifecycle (post-deploy runs only after a successful upload, never during dry-run) - GUI and CLI — same core logic, two interfaces
Installation
CLI only (no Qt required):
pip install pipndeploy
CLI + GUI:
pip install pipndeploy[gui]
CLI usage
# Initialise packaging metadata for an existing project
pipndeploy init
# Initialise and also create a minimal package skeleton
pipndeploy init --create-package
# Check whether a package name is available on PyPI
pipndeploy name-check my-package
# Build wheel + sdist
pipndeploy build
# Upload to TestPyPI (dry run first)
pipndeploy deploy --test --dry-run
# Upload to PyPI
pipndeploy deploy
# Bump the patch version (1.2.3 → 1.2.4)
pipndeploy bump patch
# Bump minor or major
pipndeploy bump minor
pipndeploy bump major
# Set an exact version
pipndeploy bump --set 2.0.0
# Clean build artefacts (does NOT uninstall by default)
pipndeploy clean
# Clean and uninstall (opt-in)
pipndeploy clean --uninstall
# Validate ~/.pypirc token configuration
pipndeploy auth-check
# Full interactive pipeline (init → build → deploy)
pipndeploy full
# All commands accept --project-dir / -d to target a specific directory
pipndeploy build -d /path/to/my-project
GUI usage
Launch the GUI:
# If installed with [gui] extra
pipndeploy-gui
# Or from the project root
python -m PiPnDeploy.gui_main
The GUI provides tabs for every operation. The Init tab pre-fills from an existing pyproject.toml if one is found in the project directory. The Version tab shows a two-step preview before writing anything to disk.
Safety model
PiPnDeploy is designed to be non-destructive by default:
| Operation | Default behaviour | Opt-in to be destructive |
|---|---|---|
clean |
Removes build/, dist/, *.egg-info |
--uninstall to also remove the package |
init on existing project |
Warns before overwriting pyproject.toml |
Confirm in dialog |
~/.pypirc generation |
Warns before overwriting, creates .pypirc.bak |
Confirm in dialog |
post_deploy hook |
Runs only after successful upload | — |
pre_build hook |
Failure aborts the build | — |
| Surgical TOML update | Only edits [project] fields; all other sections preserved |
— |
Lifecycle hooks
Place Python scripts in a hooks/ directory at your project root:
my-project/
hooks/
pre_build.py # runs before build; non-zero exit aborts the build
post_deploy.py # runs after successful upload; skipped on dry-run
Hooks receive no arguments. Use sys.exit(1) to signal failure.
Auth / .pypirc
Use the Auth Gen tab or configure ~/.pypirc manually:
[distutils]
index-servers =
pypi
testpypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-your-token-here
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-your-testpypi-token-here
Run pipndeploy auth-check to validate your configuration before deploying.
On Unix-like systems, PiPnDeploy sets ~/.pypirc permissions to 600 (owner read/write only) automatically.
Dependency detection
PiPnDeploy AST-scans your package folder to detect third-party imports. It supports:
- Flat layout:
my-project/mypkg/__init__.py - src layout:
my-project/src/mypkg/__init__.py - Multi-package: multiple packages in the same project root
The following are always excluded from the scan:
- Python standard library modules
- The project's own package name (self-imports)
- Directories:
tests,docs,examples,build,dist,.venv,venv - Files:
conftest.py,dummy.py,setup.py
Auto-detected dependencies are a starting point. Review them before publishing.
Known limitations
- Dependency detection is AST-based and may miss dynamic imports (
importlib.import_module,__import__) or conditional imports behind non-trivial logic - The GUI does not update
[project.scripts]in surgical mode — use the Init tab to change entry points - No Git integration (commit, tag, release) — this is intentional; PiPnDeploy handles packaging, not source control
- Pre-release version strings (
1.2.3rc1,1.2.3.dev0) are not incremented bybump— use--setfor those
Development
git clone https://github.com/7h3v01d/PiPnDeploy
cd PiPnDeploy
pip install -e ".[gui,dev]"
python -m pytest tests/ -v
Project structure
PiPnDeploy/
├── PiPnDeploy/
│ ├── __init__.py
│ ├── cli_main.py # Typer CLI — thin wrapper around core_logic
│ ├── core_logic.py # All shared logic — the single source of truth
│ ├── gui_main.py # PyQt6 GUI — thin wrapper around core_logic
│ └── Utils/
│ └── __init__.py
├── tests/
│ ├── test_clean_safety.py
│ ├── test_dep_detection.py
│ ├── test_entry_point_wrappers.py
│ ├── test_fixes_5678.py
│ ├── test_init_scaffold.py
│ ├── test_items_123.py
│ ├── test_pyproject_generation.py
│ └── test_version_bump.py
├── hooks/ # Optional lifecycle hooks (user-created)
├── pyproject.toml
└── README.md
License
MIT — see LICENSE for details.
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 pipndeploy-2.4.0.tar.gz.
File metadata
- Download URL: pipndeploy-2.4.0.tar.gz
- Upload date:
- Size: 52.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd67eb06cc00c3f3c4d7dfc41c571920d0214271d6a13191c46759087d60916
|
|
| MD5 |
b560808d4cf2040aa6bcfed192fa350d
|
|
| BLAKE2b-256 |
8925a1cbdcb84b5fa955133d9e9161ba7f9a5716cb931be9b66e3aaa8fc73408
|
File details
Details for the file pipndeploy-2.4.0-py3-none-any.whl.
File metadata
- Download URL: pipndeploy-2.4.0-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf7a4405fdd91220de24d63a2259dff5d6b61feb4e60a4ee6c52addd2eb1b871
|
|
| MD5 |
993ed7e0ccbc29ebca41a988dd29e44e
|
|
| BLAKE2b-256 |
1deab397ae6b22ef002cdee2a601faa0ab51f3ed496e76f900a50b42c5d6e7ca
|