extism / python-pdk

Write Extism plugins in Python
https://extism.org
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

Make it possible to specify host functions from the Python source #4

Closed zshipko closed 2 months ago

zshipko commented 2 months ago

Python doesn't have a clear way to specify these, I am considering a couple different approaches:

I'm currently leaning toward using a decorator since it seems like the cleanest integration, and should be pretty easy to parse.

nilslice commented 2 months ago

without much more context on the subject beyond what you've shared, I think the decorator sounds good, particularly since it's also how we (optionally?) declare host functions from the Python SDK

zshipko commented 2 months ago

agreed, i think that looks like the least hacky way to handle imports