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.

Download files

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

Source Distribution

wasmtime-48.0.0.tar.gz (128.8 kB view details)

Uploaded Source

Built Distributions

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

wasmtime-48.0.0-py3-none-win_arm64.whl (7.0 MB view details)

Uploaded Python 3Windows ARM64

wasmtime-48.0.0-py3-none-win_amd64.whl (8.2 MB view details)

Uploaded Python 3Windows x86-64

wasmtime-48.0.0-py3-none-musllinux_1_2_x86_64.whl (9.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

wasmtime-48.0.0-py3-none-musllinux_1_2_aarch64.whl (8.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

wasmtime-48.0.0-py3-none-manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded Python 3

wasmtime-48.0.0-py3-none-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded Python 3

wasmtime-48.0.0-py3-none-macosx_11_0_arm64.whl (8.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

wasmtime-48.0.0-py3-none-macosx_10_13_x86_64.whl (9.4 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

wasmtime-48.0.0-py3-none-any.whl (8.2 MB view details)

Uploaded Python 3

wasmtime-48.0.0-py3-none-android_26_x86_64.whl (9.7 MB view details)

Uploaded Android API level 26+ x86-64Python 3

wasmtime-48.0.0-py3-none-android_26_arm64_v8a.whl (8.8 MB view details)

Uploaded Android API level 26+ ARM64 v8aPython 3

File details

Details for the file wasmtime-48.0.0.tar.gz.

File metadata

  • Download URL: wasmtime-48.0.0.tar.gz
  • Upload date:
  • Size: 128.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wasmtime-48.0.0.tar.gz
Algorithm Hash digest
SHA256 dba27d59209fac703e7d5753af78c2af2c1cd1ed735f520ec76dc31c60a05815
MD5 8062857380a560a273889709444e5049
BLAKE2b-256 421f03a286dc84d83cc3274d5599543558442ba9332b676e6408ee9e1c171199

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: wasmtime-48.0.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wasmtime-48.0.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 09cd5e14df80a3a8d447428a548583181c568ea2e617419d23600deff21d4b82
MD5 8c240018d11e10cc7139567049bb3855
BLAKE2b-256 d7a4bb6c90d99ad893bd42f33aa7fb386deecb55987f012c0c2f5fcaba83106d

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: wasmtime-48.0.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wasmtime-48.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 21fa500e70f3819a8c0539c3f0be6b3b81ec3c630bb90c47dba4d8a2c1d4c698
MD5 13cd83434f829f81cedeeb02e43d7cb5
BLAKE2b-256 9d125266bebece874ebfa3196c973b917091dd4c55e9e9da55401e312c403044

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 62b241c8d5dfb59ff8af1ccaa5351f0ab7aba8cc872f7d80e0e3c95d54c13562
MD5 b9edfed0c86e2770f0fbd7b2eb28f7de
BLAKE2b-256 8c55ce68af7734a5a9424dd66a301b11c810215ec7f70230b35bed10ed312e97

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 77f6b75db20be065e205e7af814d4e4f06784c3a00eb346e8c76148ecb4afe5a
MD5 2cad6a3897cf856661078220d8bd9927
BLAKE2b-256 cfbf00e44d1971307620d6660760ed04796405a5fb1819c8b43ec03ad85efac6

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 26fce3613fefbe29a28e9d659dca3326e800593858e5758cad086eb802b3b766
MD5 7183cd7e8f4e8922dff1b18688a0ee01
BLAKE2b-256 1cc3a957b226979daaeb09ec024562e9aac05e475a954537e6f150eb60bca84d

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 58544d539053dff7bd4cf30c40d7a540862d683013c0dfa6ba46a063f5b682f7
MD5 26861c0c6e0f8bf2ccde3384e253e05b
BLAKE2b-256 a292e144fcf578fc394678c24b042efe45f3b0614acdb87ea95d8b839b208842

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea69889a3c51702e9da5f5f441027ca934f7758f8926a4ed167b0d6877f092e8
MD5 5cf26e1da9e0efb6bfc13d54094d1a5e
BLAKE2b-256 dca691c9c19ed7f8e164f4db6405d872c9397be9f53e4f325d0adcd5e67598f4

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 50e1ea81a3bec537d00e076722dfdc48978a56ea24619d8153aa1f75b11796b9
MD5 cd41e175e5d6b2e9a850caa06277b90e
BLAKE2b-256 8993911434c6c4406e6979b6cb67ba889c85633ff8d92eb0cb569fec6e2a43f7

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-any.whl.

File metadata

  • Download URL: wasmtime-48.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wasmtime-48.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49c9ee43e9cf59ad7453ac65dce0cc4b885837904dd3cfd45faafe930defe14a
MD5 351f1ffcb3be7a905944af518bedcc84
BLAKE2b-256 951520fad0cb2b9cff130c225bf827e16365e02883f504297eccf172c6bb7228

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-android_26_x86_64.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-android_26_x86_64.whl
Algorithm Hash digest
SHA256 d8e94276ff6c0c5ce73ee16ccbacb00b3512a4b3a664749380705d81ee06a23c
MD5 17c2c60c8aa2a4ded520574efe86befa
BLAKE2b-256 bed0f4f107166a65ddf8a6d8cf74f0cea33c06a08c74fe686f8e83b194e57e8b

See more details on using hashes here.

File details

Details for the file wasmtime-48.0.0-py3-none-android_26_arm64_v8a.whl.

File metadata

File hashes

Hashes for wasmtime-48.0.0-py3-none-android_26_arm64_v8a.whl
Algorithm Hash digest
SHA256 a55abf132fe238b843a963c68cd1a30d8f686c1bc75d8fbf042d8b7a1d51ee36
MD5 951b90f9297353cc9799de0ebc9d6b19
BLAKE2b-256 ade639da2f4047a281bce7d4651e21785942d630033931eb397cf734e7ccc048

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

48.0.0 This release

12 files

47.0.1

12 files

46.0.1

12 files

45.0.0

12 files

44.0.0

12 files

43.0.0

12 files

42.0.0

12 files

41.0.0

12 files

40.0.0

12 files

39.0.0

12 files

38.0.0

11 files

37.0.0

11 files

36.0.0

11 files

35.0.0

11 files

34.0.0

11 files

33.0.0

10 files

32.0.0

8 files

31.0.0

8 files

30.0.0

7 files

29.0.0

7 files

28.0.0

7 files

27.0.2

7 files

27.0.1

7 files

27.0.0

7 files

25.0.0

7 files

24.0.0

7 files

23.0.0

7 files

22.0.0

7 files

21.0.0

6 files

20.0.0

6 files

19.0.0

6 files

18.0.2

6 files

18.0.0

6 files

17.0.1

6 files

17.0.0

6 files

16.0.0

6 files

15.0.0

6 files

14.0.0

6 files

13.0.2

6 files

13.0.1

6 files

13.0.0

6 files

12.0.0

6 files

11.0.0

6 files

10.0.1

6 files

10.0.0

6 files

9.0.0

6 files

8.0.1

6 files

8.0.0

6 files

7.0.0

6 files

6.0.0

6 files

5.0.0

6 files

4.0.0

6 files

3.0.0

6 files

2.0.0

6 files

1.0.1

6 files

1.0.0

6 files

0.40.0

6 files

0.39.1

5 files

0.38.0

5 files

0.37.0

5 files

0.36.0

5 files

0.35.0

5 files

0.34.0

5 files

0.33.0

5 files

0.32.0

5 files

0.31.0

5 files

0.30.0

4 files

0.29.0

4 files

0.28.1

4 files

0.28.0

4 files

0.27.0

4 files

0.26.0

4 files

0.25.0

4 files

0.24.0

4 files

0.23.0

4 files

0.22.0

4 files

0.21.0

4 files

0.20.0

4 files

0.19.0

4 files

0.18.2

4 files

0.18.1

4 files

0.18.0

4 files

0.17.0

4 files

0.16.1

3 files

0.16.0

3 files

0.15.1

3 files

0.15.0

9 files

0.12.0

9 files

0.11.0

9 files

0.9.0

9 files

0.0.2

5 files

0.0.1

5 files

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