Skip to main content

wasmtime-py

Python embedding of Wasmtime

A Bytecode Alliance project

CI status Latest Version Latest Version Documentation Code Coverage

Installation

To install wasmtime-py, run this command in your terminal:

$ pip install wasmtime

The package currently supports 64-bit builds of Python 3.9+ on Windows, macOS, and Linux, for x86_64 and arm64 architectures.

Versioning

wasmtime-py follows the Wasmtime versioning scheme, with a new major version being released every month. As with Wasmtime itself, new major versions of wasmtime-py can contain changes that break code written against the previous major version.

Since every installed Python package needs to agree on a single version of wasmtime-py, to use the upper bound on the major version in the dependency requirement should be bumped reguarly, ideally as soon as a new wasmtime-py version is released. To automate this process it is possible to use the whitequark/track-pypi-dependency-version script. YoWASP/runtime is an example of a project that automatically publishes releases on PyPI once a new version of wasmtime-py is released if it passes the testsuite.

Usage

In this example, we compile and instantiate a WebAssembly module and use it from Python:

from wasmtime import Store, Module, Instance, Func, FuncType

store = Store()
module = Module(store.engine, """
  (module
    (func $hello (import "" "hello"))
    (func (export "run") (call $hello))
  )
""")

def say_hello():
    print("Hello from Python!")
hello = Func(store, FuncType([], []), say_hello)

instance = Instance(store, module, [hello])
run = instance.exports(store)["run"]
run(store)

Be sure to check out the examples directory, which has other usage patterns as well as the full API documentation of the wasmtime-py package.

Components

Components are also supported in wasmtime-py. For more information see the documentation of wasmtime.component. Using a component is similar to using core wasm modules, and for examples see the tests/component/ directory.

Contributing

See CONTRIBUTING.md.

Metadata

Release files for wasmtime 51.0.0

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

Source distribution (sdist)

Source distribution for wasmtime 51.0.0
File Size Uploaded Provenance Actions
wasmtime-51.0.0.tar.gz 131.4 kB Without provenance Details for wasmtime-51.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for wasmtime 51.0.0
File Actions
wasmtime-51.0.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for wasmtime-51.0.0-py3-none-win_arm64.whl
wasmtime-51.0.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for wasmtime-51.0.0-py3-none-win_amd64.whl
wasmtime-51.0.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for wasmtime-51.0.0-py3-none-musllinux_1_2_x86_64.whl
wasmtime-51.0.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for wasmtime-51.0.0-py3-none-musllinux_1_2_aarch64.whl
wasmtime-51.0.0-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for wasmtime-51.0.0-py3-none-manylinux2014_aarch64.whl
wasmtime-51.0.0-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for wasmtime-51.0.0-py3-none-manylinux1_x86_64.whl
wasmtime-51.0.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for wasmtime-51.0.0-py3-none-macosx_11_0_arm64.whl
wasmtime-51.0.0-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for wasmtime-51.0.0-py3-none-macosx_10_13_x86_64.whl
wasmtime-51.0.0-py3-none-any.whl Python 3 none any Details for wasmtime-51.0.0-py3-none-any.whl
wasmtime-51.0.0-py3-none-android_26_x86_64.whl Python 3 none Android API level 26+ x86-64 Details for wasmtime-51.0.0-py3-none-android_26_x86_64.whl
wasmtime-51.0.0-py3-none-android_26_arm64_v8a.whl Python 3 none Android API level 26+ ARM64 v8a Details for wasmtime-51.0.0-py3-none-android_26_arm64_v8a.whl

Total release size: 94.8 MB

Release files / wasmtime-51.0.0.tar.gz

Download URL wasmtime-51.0.0.tar.gz
Size 131.4 kB
Tags Source
SHA-256 checksum
How to use checksums
36f2c67d8d951b1724d64d7a0f5a6c5464cc404e416e6325dd766d278fecacf9
BLAKE2b-256 checksum
How to use checksums
0fccaaa0ba46a5eb2d777c0d361c1510e736729d8dbd1e6ff28b2f1760133371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-win_arm64.whl

Download URL wasmtime-51.0.0-py3-none-win_arm64.whl
Size 7.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
7f5e0f67a886fcf5d5bc218ae7052b34ee52c688d5db11dd5f0fa2d5e39c79fd
BLAKE2b-256 checksum
How to use checksums
902574fc9167800cb78c19a40b08882f8eba0815a14e2598891978001902f401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-win_amd64.whl

Download URL wasmtime-51.0.0-py3-none-win_amd64.whl
Size 8.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ee0f1c5da515e1b8caaeb755102421a610704777830771d06290fb1e37a9cc49
BLAKE2b-256 checksum
How to use checksums
8c774ab35eab43a4c333c19b41c6150335444b95cb45069959e3ea73b3b6ad7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-musllinux_1_2_x86_64.whl

Download URL wasmtime-51.0.0-py3-none-musllinux_1_2_x86_64.whl
Size 9.6 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
86f7e0d10facc02230a91531ecf09705a0ef81ef17cc96f5880d0655b9e95621
BLAKE2b-256 checksum
How to use checksums
6dbe46aa4d29e21e5e743d2918969177f8601af8c370fbf56a673d9f456d63e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-musllinux_1_2_aarch64.whl

Download URL wasmtime-51.0.0-py3-none-musllinux_1_2_aarch64.whl
Size 8.6 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
e830918bde48ba39c514de5e8fe4662ce2810ac9d82dc421daaf550fe7a7dd54
BLAKE2b-256 checksum
How to use checksums
bb92e77827cbeed83ba7838b17fda8620b1105545ed810d327f5885dfe7badd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-manylinux2014_aarch64.whl

Download URL wasmtime-51.0.0-py3-none-manylinux2014_aarch64.whl
Size 8.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4c1ea115c98b1b0fe6dca5f7feb72691ec570fd153a6f9402920233118cacadb
BLAKE2b-256 checksum
How to use checksums
71a344a3ece3508bd475c20932bb5a7574126c9b68b1a2c41055c53f38b5c1e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-manylinux1_x86_64.whl

Download URL wasmtime-51.0.0-py3-none-manylinux1_x86_64.whl
Size 9.5 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
cb4a48bae3de3c0ca99a67e05debbe4bfe48bea7f25ac71ee42fb3fd681ef93c
BLAKE2b-256 checksum
How to use checksums
3786b15ec450e98047a9a468f6c883ebe3fba259ea6ddd2503f20aa450c3e957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-macosx_11_0_arm64.whl

Download URL wasmtime-51.0.0-py3-none-macosx_11_0_arm64.whl
Size 8.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ace48412f269c8f29eb9f160b5259c7895720f986f99a8e84a625bba2d457913
BLAKE2b-256 checksum
How to use checksums
5f9660eac32aa363bdca05eb0ae306e180530fc9778ce14412d0374fe808ade9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-macosx_10_13_x86_64.whl

Download URL wasmtime-51.0.0-py3-none-macosx_10_13_x86_64.whl
Size 9.1 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
caa082345cef1a9d70d493a105f620e3c881b9e9a515b153b1d4a5e5bc14e5aa
BLAKE2b-256 checksum
How to use checksums
ad4554af6bf5e3203cd939dde8b82bafcbdefb0c397643ad8809a0a666e82a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-any.whl

Download URL wasmtime-51.0.0-py3-none-any.whl
Size 8.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e33711a78d289f98cb2302d494eed1f3498585dbdb8c6d86dbfe0c99b6b4bd4c
BLAKE2b-256 checksum
How to use checksums
63bcfefac470bfd8cc3aaf11626ac7b7a34833a7962003de19c6987395b50ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-android_26_x86_64.whl

Download URL wasmtime-51.0.0-py3-none-android_26_x86_64.whl
Size 9.5 MB
Tags Android API level 26+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3064481dd2e8ab6c7363ce667827f9f891397f448e4e10c9347393fe80fbb768
BLAKE2b-256 checksum
How to use checksums
e43eece54166dcccd74b164dbe6d9ee4352a01fea9125d04d8e5df5fb079e58c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wasmtime-51.0.0-py3-none-android_26_arm64_v8a.whl

Download URL wasmtime-51.0.0-py3-none-android_26_arm64_v8a.whl
Size 8.6 MB
Tags Android API level 26+ ARM64 v8a Python 3
SHA-256 checksum
How to use checksums
ae46ab75887a5671698116de1cd1996d3a4cdce2a10dcceb412581c9269d083e
BLAKE2b-256 checksum
How to use checksums
9589093b8f94d2e200a8b3aea966400e8daf5bf1ee3fbd0841b67d479aa73f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for wasmtime 51.0.0

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.

Release history Release notifications | RSS feed

This release

51.0.0 This release

12 release files No provenance

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