Skip to main content

patches for promplate-core for running in pyodide runtime

Reason this release was yanked:

promplate.llm.openai no longer expose `ensure`

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.3.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

promplate_pyodide-0.0.3.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: promplate_pyodide-0.0.3.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.14.0 CPython/3.12.0 Windows/11

File hashes

Hashes for promplate_pyodide-0.0.3.1.tar.gz
Algorithm Hash digest
SHA256 802f12fd552474d68982ac4154b19ca7e15b32b8c5f9a96893d238a2041f8c5c
MD5 cc84baaa4d76dc525b121962ea21ba92
BLAKE2b-256 ddd4003dc3e94d993b1641059271a57757460d77f5d0c6c1904853983d1259e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for promplate_pyodide-0.0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4218961df11dcc10aaccdab077f4b8266c8e70a9b50b6c6aaf5496055c04ef
MD5 ddba94599cf5934f37ff001157ea1a66
BLAKE2b-256 b4891c85f432e07b77b0298920eb2d7071cb027a57438370cdf70fa8ad5008f4

See more details on using hashes here.

Supported by

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