[go: up one dir, main page]

Skip to main content
Warning Some features may not work without JavaScript. Please try enabling it if you encounter problems.

A WebAssembly runtime powered by Wasmtime

Project description

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.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

wasmtime-42.0.0.tar.gz (117.1 kB view details)

Uploaded Source

Built Distributions

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

The dropdown lists show the available interpreters, ABIs, and platforms.

Enable javascript to be able to filter the list of wheel files.

wasmtime-42.0.0-py3-none-win_arm64.whl (5.4 MB view details)

Uploaded Python 3Windows ARM64

wasmtime-42.0.0-py3-none-win_amd64.whl (6.4 MB view details)

Uploaded Python 3Windows x86-64

wasmtime-42.0.0-py3-none-musllinux_1_2_x86_64.whl (7.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

wasmtime-42.0.0-py3-none-musllinux_1_2_aarch64.whl (6.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

wasmtime-42.0.0-py3-none-manylinux2014_aarch64.whl (6.8 MB view details)

Uploaded Python 3

wasmtime-42.0.0-py3-none-manylinux1_x86_64.whl (7.7 MB view details)

Uploaded Python 3

wasmtime-42.0.0-py3-none-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

wasmtime-42.0.0-py3-none-macosx_10_13_x86_64.whl (7.5 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

wasmtime-42.0.0-py3-none-any.whl (6.4 MB view details)

Uploaded Python 3

wasmtime-42.0.0-py3-none-android_26_x86_64.whl (7.7 MB view details)

Uploaded Android API level 26+ x86-64Python 3

wasmtime-42.0.0-py3-none-android_26_arm64_v8a.whl (6.8 MB view details)

Uploaded Android API level 26+ ARM64 v8aPython 3

File details

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

File metadata

  • Download URL: wasmtime-42.0.0.tar.gz
  • Upload date:
  • Size: 117.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wasmtime-42.0.0.tar.gz
Algorithm Hash digest
SHA256 90485655d6e541b817a7baa1b3071b4525d03f76bcb6ad04661774f06a3b02d4
MD5 7335076bb7fd341c14b7638bca1da5bd
BLAKE2b-256 54cd1f110419ed006f91624010f4df4da82490220bd5527650284c97fc758a6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wasmtime-42.0.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wasmtime-42.0.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 8caa13a6ee264969449c008da1dcb8f9f6c954800853527714e7fcddbdda9166
MD5 ace3822e0aa2ee6aecc4802c0901e5b7
BLAKE2b-256 44b2e93046661deef4d8fee2f40080a28e5ff201cc98d4fb1929a46367c34778

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wasmtime-42.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3a360a1285457021efe24369490cd719996596f2cbe1aa62dae6ad68179cf0f9
MD5 32135ac7ff42a6ee974cb0b55f131a94
BLAKE2b-256 9ae56650c9e7ad904c9a6730c4b762b1dfed4f7d7b0e981e3624a6ecd7abb7ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e9ef6dbd1a2cff21694ba64f27b90a7ab0af61a54d911a59682005830683dc8a
MD5 15a9f32d48da41a31a4417210c133f68
BLAKE2b-256 46685c129389f67219a90c3ba0dcf85555249bde9797760f2d715bec03bc198a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ba317e879aab71c407e7012f4dc10b221c6daf737496c501005612e11d26e8ee
MD5 f65efe7a0aacbe26e981138f82c8ed8f
BLAKE2b-256 a3ae5c5e96273a36c70753e8ba4db323dd9b1ccf6fcea4ccad99d458ad2ecf13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 78f9353b9fdc2f6e7ed13e28ce0394533f5a62710b75c00434ac82681f738924
MD5 300ee24b6ec4a7ee66cdcea4da548723
BLAKE2b-256 ed5dfae28526b1d42f0365e4fd6c2a212c7c000e47d7320632018fa45735a06e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ca12269ee88aac6b1f64b5f324abf3c6370ff853338d991292f10cb17b906667
MD5 5a19ee6a25de533085a52644c1fe1ac6
BLAKE2b-256 4454a774313c19c1c0ae2c1897af697c12178904d67911f42c4a9bdddba68640

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 411bf05df47c8a36c6b31b6012720ac1251b95fdd155e389b25eb6fbbd7e181c
MD5 12650c828e7fe653d6a534996ab95861
BLAKE2b-256 4704ef61af9fe9e5c0a8d782c8662302535ee6e6dba1a6929191fa3ea371a491

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 21e3dafd74704de0e7ed7668ab76cc5a9df130b4306befbfcb08ddb29673c784
MD5 96219df8f3785d9a413bfaa75ca3a93c
BLAKE2b-256 3c6fa40322bdd55809441bab7e1ac707aa38ced3572904a700f1dfb4b2520dcd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wasmtime-42.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wasmtime-42.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a166bd262608806f3295343fcd07ee3e037f931f6d3b0a24ab1cfc7ccc3e8eb
MD5 4d8d7288d5828f170b215ee26f102b61
BLAKE2b-256 c6d25b2bf901b0a9b8050d966dff61e353de7cd86dd58679a79e48372ff8b3a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-android_26_x86_64.whl
Algorithm Hash digest
SHA256 cdd9710fad242dde7cb0eacbe48bf902bb1bac6ecbecd3e743c31af463a795c6
MD5 255d80069a5c864dbab0981627215e16
BLAKE2b-256 2d97d4f5f46eef74e013c3a0caa9b8625bb1c4162e2b9817258596ee6932c019

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wasmtime-42.0.0-py3-none-android_26_arm64_v8a.whl
Algorithm Hash digest
SHA256 214e7d294ce1b5adb94f09a870a2ab6759173dc0194bdde74ee4492b477d8392
MD5 e98c3f5ee51bcbf6419766597a4cd0e2
BLAKE2b-256 20cbf206f7a839d6843b01c041000056bf7aad23cf72fe2333a0c5dad144e0f2

See more details on using hashes here.

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