Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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 pi console script
  • nodejs-wheel-binaries as the bundled Node.js runtime
  • a build hook that downloads the pinned @jamwil/pi-coding-agent npm 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 subprocesses
  • PI4PY_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.5.1.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pi4py 1.5.1.dev0
File Size Uploaded Provenance Actions
pi4py-1.5.1.dev0.tar.gz 8.3 kB Without provenance Details for pi4py-1.5.1.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pi4py 1.5.1.dev0
File Interpreter ABI Platform Actions
pi4py-1.5.1.dev0-py3-none-any.whl Python 3 none any Details for pi4py-1.5.1.dev0-py3-none-any.whl

Total release size: 4.1 MB

Release files / pi4py-1.5.1.dev0.tar.gz

Download URL pi4py-1.5.1.dev0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
735085a9b25d01e41003492157e26d424762a5fdb5ad663ebf2dc2b763bb32cf
BLAKE2b-256 checksum
How to use checksums
d7db47c76a895a6d7a4150a271567615c80a01f1b8f3de6fbd9029937feca110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.5.1.dev0-py3-none-any.whl

Download URL pi4py-1.5.1.dev0-py3-none-any.whl
Size 4.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d62829fdc0d091058234c2f8bd0b20080c71f65a0659dd642201f4a25ec320f9
BLAKE2b-256 checksum
How to use checksums
2a4f1c956d2f8e4305394bac3fe14f92d1a0389505b5dedc29b91dd3b3f4f0a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.5.1.dev0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page