File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments