Extism Python Host SDK
This repo contains the Python package for integrating with the Extism Webassembly framework. Install this library into your Python application host to run Extism WebAssembly guest plug-ins.
import extism
import json
manifest = {"wasm": [{"url": "https://github.com/extism/plugins/releases/latest/download/count_vowels.wasm"}]}
with extism.Plugin(manifest, wasi=True) as plugin:
wasm_vowel_count = plugin.call(
"count_vowels",
"hello world",
parse = lambda output: json.loads(bytes(output).decode('utf-8'))
)
print(wasm_vowel_count) # {'count': 3, 'total': 3, 'vowels': 'aeiouAEIOU'}
Installation
Install this package from PyPI:
# using pip
$ pip install extism==1.0.0
# using poetry
$ poetry add extism=^1.0.0
The extism package should install an appropriate extism_sys dependency
containing a prebuilt shared object for your system. We support the following
targets:
- MacOS 11.0+,
arm64 - MacOS 10.7+,
x86_64 - Manylinux 2.17+,
aarch64 - Manylinux 2.17+,
x86_64 - MUSL Linux 1.2+,
aarch64 - Windows (MSVC),
x86_64
If you need support for a different platform or architecture, please let us know!
Documentation
Check out the docs:
Development
Local dev
Install just. Running just test should install all
other prerequisites.
Release workflow
- Create a semver-formatted git tag (
git tag v1.0.0). - Push that tag to the repository (
git push origin v1.0.0.) - Wait for the Build workflow to run.
- Once the build workflow finishes, go to the releases page. You should see a draft release.
- Edit the draft release. Publish the release.
- Wait for the Release workflow to run.
- Once the release workflow completes, you should be able to
pip install extism==${YOUR_TAG}from PyPI.
LICENSE
Metadata
Release files for extism 1.1.1
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 |
|---|---|---|---|---|
| extism-1.1.1.tar.gz | 11.6 kB | Without provenance | Details for extism-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| extism-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for extism-1.1.1-py3-none-any.whl |
Total release size: 22.8 kB
Release files / extism-1.1.1.tar.gz
| Download URL | extism-1.1.1.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
067bf4ebd89ba85681508a77eb7f213ab13d2dbd6e71dabdac5d9622c61ee1d1
|
|
BLAKE2b-256 checksum How to use checksums |
ccc6573488066680ef80ba6a46ab5e0df42aa4beafac51d2c3cc140a062531af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / extism-1.1.1-py3-none-any.whl
| Download URL | extism-1.1.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
157692d7dc79cde6b1c9759eaf765f04b34b28e1f3a4a84507294c06081c8e5b
|
|
BLAKE2b-256 checksum How to use checksums |
e3acf730be96df64fd3c85b0c24f16993181f72b72dfba3099ad86d49a55e7c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Security for extism 1.1.1
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.