Skip to content

YEP-2946 Add prefix when getting objects from storage (run-py) #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions yepcode_run/api/yepcode_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ def create_module_version_alias(
) -> VersionedModuleAlias:
return self._request("POST", f"/modules/{module_id}/aliases", {"data": data})

def get_objects(self) -> List[StorageObject]:
response = self._request("GET", "/storage/objects")
def get_objects(self, params: Optional[Dict[str, Any]] = None) -> List[StorageObject]:
response = self._request("GET", "/storage/objects", {"params": params or {}})
return [StorageObject.from_dict(obj) for obj in response]

def get_object(self, name: str) -> requests.Response:
Expand Down
6 changes: 3 additions & 3 deletions yepcode_run/storage/yepcode_storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List
from typing import List, Optional, Dict, Any

from ..api.api_manager import YepCodeApiManager
from ..api.types import CreateStorageObjectInput, StorageObject, YepCodeApiConfig
Expand All @@ -25,5 +25,5 @@ def upload(self, name: str, file: bytes) -> StorageObject:
def delete(self, name: str) -> None:
return self._api.delete_object(name)

def list(self) -> List[StorageObject]:
return self._api.get_objects()
def list(self, **kwargs) -> List[StorageObject]:
return self._api.get_objects(kwargs if kwargs else None)