Get help from the marimo community

s
sminot
Offline, last seen last month
Joined January 28, 2025
I am very interested in using html-wasm to deploy marimo, and I am currently working through the issue of accessing data in S3. Since boto3 is not available in Pyodide, I was just going to use the TS client for AWS S3. The setup is working fine for running the JS code from within Pyodide (import js, js.eval, etc.). However, since I'm not very experienced with TS, I'm having trouble loading the client library appropriately.

I have:

# Load the AWS SDK for JavaScript
js.self.AWS = await js.eval("""
(async () => {{
import {{ S3Client, GetObjectCommand }} from "@aws-sdk/client-s3";

// Replace with your actual credentials
const client = new S3Client({{
region: "{region}",
credentials: {{
accessKeyId: "{access_key_id}",
secretAccessKey: "{secret_access_key}",
sessionToken: "{session_token}",
}}
}});

return {{ client }};
}})();
""".format(
....

But I get the error: This cell raised an exception: JsException('SyntaxError: Cannot use import statement outside a module')

Any suggestions of how to resolve this?
17 comments
s
M
I've got an app that I'd like to deploy via html-wasm, but I'm getting an error when I try to start a thread.

You can see the code here - https://github.com/FredHutch/differential-expression-viewer/blob/main/app.py

Is threading supported in WASM or is that not possible?
2 comments
s
M