Skip to content

Commit

Permalink
Add download method in JS SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Mar 8, 2024
1 parent 2d84d07 commit 67da0ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-crabs-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"e2b": patch
---

Add artifact download method in JS SDK
4 changes: 4 additions & 0 deletions packages/js-sdk/src/templates/dataAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export class Artifact<S extends DataAnalysis> {
this.path = path
this._sandbox = sandbox
}

async download() {
return this._sandbox.downloadFile(this.path)
}
}

export interface RunPythonOpts<S extends DataAnalysis> extends Omit<ProcessOpts, 'cmd'> {
Expand Down

0 comments on commit 67da0ed

Please sign in to comment.