Skip to main content

patches for promplate-core for running in pyodide runtime

Project description

promplate-pyodide

Run your promplate project in the browser with pyodide!

Usage

from micropip import install  # in pyodide runtime
await install("promplate-pyodide")

from promplate_pyodide import patch_all
patch_all()

You can register the openai module as the JavaScript SDK in the JavaScript scope because the Python SDK v1.x doesn't support pyodide.

It will remove sync APIs of promplate.llm.openai because the JavaScript OpenAI SDK is async-only.


Of course you can use OpenAI Python SDK v0.x in pyodide, but it is not recommended.

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

promplate_pyodide-0.0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

promplate_pyodide-0.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file promplate_pyodide-0.0.4.tar.gz.

File metadata

  • Download URL: promplate_pyodide-0.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for promplate_pyodide-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4a5f52746d42a548d458fb8685bd4c70a6afe80e9c772a00f238b2e88a122668
MD5 48fb207465ad3d69ef627afe22f1e227
BLAKE2b-256 64e74dd03c322e3ddbf3383a67be178e3f968fa68747a1ededc583ecc18ba20e

See more details on using hashes here.

Provenance

The following attestation bundles were made for promplate_pyodide-0.0.4.tar.gz:

Publisher: ci.yml on promplate/pyodide

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

File details

Details for the file promplate_pyodide-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for promplate_pyodide-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0d6039e71863c050b0c0be842b5927170874c34113c81f79f7d6aa6ff6eecb3a
MD5 a266ff4251c1f971a3f75f884ca44a6b
BLAKE2b-256 f2622e0bd45facfe6ae2d2c45bfd2c5a322fc27f36438541e15ac7e9aeb79d27

See more details on using hashes here.

Provenance

The following attestation bundles were made for promplate_pyodide-0.0.4-py3-none-any.whl:

Publisher: ci.yml on promplate/pyodide

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