Closed zshipko closed 5 months ago
Adds TypedPlugin class, which can be inherited from to create something similar to the typed_plugin! macro in the Rust SDK
TypedPlugin
typed_plugin!
class Example(example.TypedPlugin): def count_vowels(self, s: str) -> typing.Annotated[dict, extism.Json]: raise NotImplementedError example_plugin = Example(manifest)
TypedPlugin attempts to do automatic conversion of input and return values similar to how host_fn does it (one major difference is integers/floats aren't supported by default)
host_fn
Closing this because the TypedPlugin interface doesn't work as well with a dynamically typed language.
Adds
TypedPlugin
class, which can be inherited from to create something similar to thetyped_plugin!
macro in the Rust SDKExample
TypedPlugin
attempts to do automatic conversion of input and return values similar to howhost_fn
does it (one major difference is integers/floats aren't supported by default)