My general solution to project management problems with PEP 723 scripts is to develop the script as a regular Python application that has `pyproject.toml`.
It lets you use all of your normal tooling.
While I don't use an LSP-based editor, it makes things easy with Ruff and Pyright.
I run my standard Poe the Poet (https://poethepoet.natn.io/) tasks for formatting, linting, and type checking as in any other project.
One drawback of this workflow is that by default, you duplicate the dependencies: you have them both in the PEP 723 script itself and `pyproject.toml`.
I just switched a small server application from shiv (https://github.com/linkedin/shiv) to inline script metadata after a binary dependency broke the zipapp.
I experimented with having `pyproject.toml` as the single source of truth for metadata in this project.
I wrote the following code to embed the metadata in the script before it was deployed on the server.
In a project that didn't already have a build and deploy step, you'd probably want to modify the PEP 723 script in place.
If you already have a pyproject.toml, and a "build and deploy step", why not just package normally? PEP 723 was developed for the part of the Python world that doesn't already live on PyPI (or a private package index).
I probably should!
My motivation early into the project was to try different ways to distribute a TUI app in Python and see how practical they were.
I started with the most self-contained, Nuitka. I quickly switched to building a zipapp with shiv because it was faster and cross-platform if you avoided binary dependencies.
I wanted to be able to share a Python application with others easily, especially with technical users who weren't heavily into Python.
PEP 723 added the ability for those hypothetical users to inspect the app and modify it lightly with minimum effort.
But since I am still the sole user, I can just build a wheel and install it with `uv tool install` on the server.
One drawback of this workflow is that by default, you duplicate the dependencies: you have them both in the PEP 723 script itself and `pyproject.toml`. I just switched a small server application from shiv (https://github.com/linkedin/shiv) to inline script metadata after a binary dependency broke the zipapp. I experimented with having `pyproject.toml` as the single source of truth for metadata in this project. I wrote the following code to embed the metadata in the script before it was deployed on the server. In a project that didn't already have a build and deploy step, you'd probably want to modify the PEP 723 script in place.