Releases: extism/python-pdk
v0.1.4
What's Changed
- ci: fix publish by @G4Vi in #45
- ci: added target explicitly by @G4Vi in #46
- chore: bump verison to 0.1.4 by @G4Vi in #47
Full Changelog: v0.1.3...v0.1.4
Attention python-pdk users: v0.1.3/v0.1.4 contains some breaking changes. In particular, the custom JSON handling has been removed (including extism.Json
). The reason being the previous serialization method relied on trial and error, so it led to types sometimes being misdecoded as the wrong types. To make the python-pdk unopinionated on the serialization method of choice, in-line with the other extism’s pdks, and to keep the python-pdk lightweight, no replacement has been added to the python-pdk.
For an opinionated serialization, I recommend trying out XTP: https://docs.xtp.dylibso.com/docs/overview , using the service is not a requirement for developing an XTP schema and using the cli to generate bindings for Python and many other languages. The source for the python bindgen is here https://github.com/dylibso/xtp-python-bindgen/ it uses dataclass wizard https://dataclass-wizard.readthedocs.io/en/latest/overview.html to handle JSON serialization/deserialization.
As for a migration guide, if you were using extism.Json
as a base class, you can try instead deriving fromJSONWizard
if you use dataclass-wizard. These mcp.run servlets https://github.com/dylibso/mcp.run-servlets/tree/main/servlets/obsidian and https://github.com/dylibso/mcp.run-servlets/tree/main/servlets/eval-py also serve as examples of using dataclass-wizard with extism. Unfortunately, extism.input
and extism.output
became a lot less smart in this update, so you’ll see there .from_json()
and .to_json()
are explicitly called. We’re open to suggestions or better PRs on how to add back that type based handling without making dataclass-wizard a hard dependency of the extism python-pdk.
v0.1.3
What's Changed
- Document extism.Json by @bhelx in #20
- chore: support http response headers and trace logging by @zshipko in #21
- fix: expose http headers by @zshipko in #24
- feat: add overview on generating bindings by @nilslice in #25
- Add instructions for using host functions by @fliepeltje in #27
- Add rust-toolchain file by @fliepeltje in #30
- Update README.md by @ghugeshree in #35
- Add debug flag to docs + fix configs example by @fliepeltje in #36
- docs: add information about PYTHONPATH by @zshipko in #39
- cleanup: remove custom json by @G4Vi in #41
- build: target wasm32-wasip1 instead of wasm32-wasi as target is removed by @G4Vi in #42
- chore: bump version to 0.1.3 by @G4Vi in #43
New Contributors
- @nilslice made their first contribution in #25
- @fliepeltje made their first contribution in #27
- @ghugeshree made their first contribution in #35
- @G4Vi made their first contribution in #41
Full Changelog: v0.1.2...v0.1.3
v0.1.2
v0.1.1
What's Changed
- feat: add install script by @zshipko in #11
- chore: update install script and add additional paths to check for data dir by @zshipko in #13
- fix: Correct file copying in install.sh by @FjodorGit in #14
New Contributors
- @FjodorGit made their first contribution in #14
Full Changelog: v0.1.0...v0.1.1