Skip to main content

Stream Python packages at runtime — the PyPI CDN client

Project description

🌀 Whispy Client

Import Python packages at runtime with a zero-dependency client. Keep your scripts clean, your environments disposable, and your setup friction low.

stdlib only Whispy repo MIT

The client lives in the Whispy repository, with the implementation in client/whispy_client and the server entrypoint in server/app.py. It downloads a bundle from a Whispy server, extracts it to a temporary directory, and imports the requested module at runtime.

When to Use It

  • Throwaway scripts that need requests, numpy, or beautifulsoup4 without a setup step.
  • Short-lived jobs where you want packages to vanish when the process exits.
  • Pinned runtime experiments where one exact version matters.
  • Self-hosted setups that point at your own server from the main repo.

Quick Examples

from whispy_client import remote, configure

configure(verbose=True)

requests = remote("requests")
numpy = remote("numpy", version="1.26.4")
bs4 = remote("beautifulsoup4", module="bs4", deps=True)
# Version pinning (use the version parameter)
requests = remote("requests", version="2.31.0")
numpy = remote("numpy", version="1.26.4")

# Common import name mismatches
bs4 = remote("beautifulsoup4", module="bs4")
PIL = remote("pillow", module="PIL")
yaml = remote("pyyaml", module="yaml")
dateutil = remote("python-dateutil", module="dateutil")
cv2 = remote("opencv-python", module="cv2", deps=True)

Import Failure Tips

If a package downloads but import fails with an error like No module named 'numpy', that usually means a dependency is missing from the runtime bundle.

  • Retry with deps=True for that call.
  • Or set configure(deps=True) once for process-wide behavior.
  • Keep module="..." when the import name differs from the distribution name.

Example:

# opencv-python imports as cv2 and needs runtime dependencies
cv2 = remote("opencv-python", module="cv2", deps=True)

Install

pip install whispy-client

For local development from this repo:

cd client
pip install -e .

API

remote(package, *, module=None, version=None, deps=False, host=None)

package can be a bare PyPI distribution name or an exact pin such as requests==2.31.0. If the import name differs from the distribution name, pass module=....

deps=True asks the server to include install-time dependencies as well. That behavior is best-effort and does not perform full dependency conflict resolution.

Param Description
package PyPI distribution name, optionally with ==version
module Import name if different from the package name
version Explicit version override, if you do not want to embed it in package
deps Fetch install-time dependencies as well
host Per-call Whispy server override

configure(*, host=None, deps=None, verbose=None)

Sets process-wide defaults. The default host comes from WHISPY_HOST, falling back to https://cdn.whispycdn.dev.

Param Description
host Default Whispy server URL
deps Default dependency-fetching behavior
verbose Print progress messages while fetching and importing

Code References

License

MIT. Packages are sourced from PyPI and remain under their original licenses.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whispy_client-1.1.5.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whispy_client-1.1.5-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file whispy_client-1.1.5.tar.gz.

File metadata

  • Download URL: whispy_client-1.1.5.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for whispy_client-1.1.5.tar.gz
Algorithm Hash digest
SHA256 71641dc10b8c4e3cfbfab44bd0f629536fb047298aaf7a056cfd676365df750f
MD5 977b9c70db32c191e0aa6c1829acb191
BLAKE2b-256 16277306b36614884c03417f8c1275c6b6ac48cc073b8f4ed5e4f1046c8d4498

See more details on using hashes here.

Provenance

The following attestation bundles were made for whispy_client-1.1.5.tar.gz:

Publisher: ci.yml on Dark-Avenger-Reborn/Whispy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whispy_client-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: whispy_client-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for whispy_client-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b3a4cb0b9aff436dd24e02db8a97c41fa3d1c2887a0c8999adad8efb6db8832e
MD5 9f4641e708dec906adcdf77de973be40
BLAKE2b-256 10281d7deddc2470638fb289f46af95751948872c4aa523d840897c24261005d

See more details on using hashes here.

Provenance

The following attestation bundles were made for whispy_client-1.1.5-py3-none-any.whl:

Publisher: ci.yml on Dark-Avenger-Reborn/Whispy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page