Add filtering sandboxes by state in the SDKs#564
Conversation
🦋 Changeset detectedLatest commit: bb86d48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
mlejva
left a comment
There was a problem hiding this comment.
@mishushakov please add a section to docs here mentioning how to list and delete paused sandboxes
There was a problem hiding this comment.
@mishushakov will deleting paused sandboxes be included in a separate PR? I'm asking because the new docs addition doesn't mention anything about deleting paused sandboxes.
Other than that, this looks good to me on the docs level
There was a problem hiding this comment.
Yes, this will be a separate PR.
There was a problem hiding this comment.
Nevermind, I have decided to add it here as well to avoid merge conflicts
|
One more thing, I noticed that in Python, we support importing the state type: from e2b.api.client.models.get_sandboxes_state import GetSandboxesState
sandboxes = Sandbox.list(state=GetSandboxesState.PAUSED)but in JS we expect users to just pass a string: const sandboxes = await Sandbox.list({ state: 'paused' })Why not passing just a string for Python as well? |
|
Has to do with the way we generate enum types for Python SDK, I will look, maybe there's a flag for string-style enums in the generator |
|
Can we merge #532 first as support for that is already in API? Will the mentioned PR break if we later deploy the API pagination changes? |
|
Merging #532. The PR should still work even with pagination changes. |
|
superseded by #667 |
Adds a new optional param to filter sandboxes by state