pi4py
pi4py packages a Python launcher for the @jamwil/pi-coding-agent npm CLI.
@jamwil/pi-coding-agent is a slow fork of @earendil-works/pi-coding-agent.
The primary use for this is to expose a self-contained pi executable that can
be used from python using rpc mode.
What it installs
- a
piconsole script nodejs-wheel-binariesas the bundled Node.js runtime- a build hook that downloads the pinned
@jamwil/pi-coding-agentnpm package and packages its standalone JavaScript bundle into the Python wheel
Usage
Install the wheel and invoke the console script with pi from the command line
or from Python with subprocess.Popen:
import subprocess
process = subprocess.Popen(["pi", "--help"])
process.wait()
To get the absolute path to the Node.js binary installed by
nodejs-wheel-binaries in the active virtual environment:
from pi4py import get_node_binary
node = get_node_binary()
You can also print the path directly from the command line:
pi-node-path
The pi entry point launches the bundled @jamwil/pi-coding-agent CLI with the
bundled Node.js executable. The standalone @jamwil/pi-coding-agent bundle is
downloaded during wheel build / pip install from sdist.
It also routes npm, npx, node, and corepack lookups to bundled shims and
isolates npm global installs under PI_CODING_AGENT_DIR/npm-global by default.
Useful environment variables:
PI4PY_NPM_PREFIX: override the npm global prefix used by launched pi subprocessesPI4PY_SKIP_NPM_BUILD: skip the npm build hook for metadata/debug builds only; the resulting package will not run unless a runtime is already present
Updating the pinned pi version
Sync dependencies, then update the pinned npm version:
uv sync --all-extras
uv run python tools/update_pi_version.py --version 0.84.3-dev.1
Building
uv build
Building downloads the pinned @jamwil/pi-coding-agent npm tarball, extracts
its dist/standalone bundle into src/pi4py/_vendor/npm_runtime, and includes
that small runtime in the wheel.
Testing the bundled wheel
uv run --no-editable pi --version
Metadata
Release files for pi4py 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pi4py-1.0.3.tar.gz | 8.3 kB | Without provenance | Details for pi4py-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pi4py-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for pi4py-1.0.3-py3-none-any.whl |
Total release size: 3.9 MB
Release files / pi4py-1.0.3.tar.gz
| Download URL | pi4py-1.0.3.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff3eaef44b91d51dcb665607a27443936c39e61f933f3a6e926505992df0854a
|
|
BLAKE2b-256 checksum How to use checksums |
fd5fe196043384c52fed24b504f7123be9eca35f78ba7c4fef52d0231d866629
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pi4py-1.0.3-py3-none-any.whl
| Download URL | pi4py-1.0.3-py3-none-any.whl |
|---|---|
| Size | 3.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
243c73221b8b6ce6ff7f077add6193feb25b01916ecdd01a68e3e5e504ed95e6
|
|
BLAKE2b-256 checksum How to use checksums |
780e870ca6a1612e151ddcdd2e07a673e979b22dc96000c62761b3bc5f0fff9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pi4py 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.