Python doesn't have a clear way to specify these, I am considering a couple different approaches:
@extism.import("extism:host/env", "my_func")
def my_func(x: str) -> str:
pass
- Import comments, something like
# import: extism:host/env my_func
def my_func(x: str) -> str:
pass
- Putting imports into a separate JSON file - this is not a great option since it makes imports appear out of nowhere in the source
I'm currently leaning toward using a decorator since it seems like the cleanest integration, and should be pretty easy to parse.