Skip to content

Commit 7b71e89

Browse files
authored
Update storage.py
1 parent b105cac commit 7b71e89

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎app/infra/storage.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,29 @@ class Storage(Protocol):
3939

4040
def put_bytes(self, key: str, data: bytes) -> None:
4141
"""Store ``data`` under ``key`` (overwrites)."""
42+
...
4243

4344
def put_stream(self, key: str, stream: BinaryIO) -> int:
4445
"""Store a stream under ``key``; return the number of bytes written."""
46+
...
4547

4648
def get_bytes(self, key: str) -> bytes:
4749
"""Return the bytes stored under ``key`` (raises if absent)."""
50+
...
4851

4952
def open_stream(self, key: str) -> Iterator[bytes]:
5053
"""Yield the object's bytes in chunks (raises if absent)."""
54+
...
5155

5256
def exists(self, key: str) -> bool: ...
5357

5458
def size(self, key: str) -> int | None:
5559
"""Byte length of the stored object, or None if absent."""
60+
...
5661

5762
def delete(self, key: str) -> None:
5863
"""Remove ``key``; a missing key is not an error (idempotent)."""
64+
...
5965

6066

6167
_CHUNK = 1024 * 1024

0 commit comments

Comments
 (0)