AsyncStorage - Tinker Documentation
tinker_cookbook.stores.AsyncStorage
class tinker_cookbook.stores.AsyncStorage( Protocol)
Async byte-level file I/O.
Cloud backends (S3, GCS) implement this natively. LocalStorage wraps sync methods with asyncio.to_thread.
aread( path)
Async version of Storage.read.
Parameters:
- path ( str)
Returns: bytes
awrite( path, data)
Async version of Storage.write.
Parameters:
Returns: None
aappend( path, data)
Async version of Storage.append.
Parameters:
Returns: None
aexists( path)
Async version of Storage.exists.
Parameters:
- path ( str)
Returns: bool
astat( path)
Async version of Storage.stat.
Parameters:
- path ( str)
Returns: StorageStat | None
aread_range( path, offset, length)
Async version of Storage.read_range.
Parameters:
Returns: bytes
alist_dir( prefix)
Async version of Storage.list_dir.
Parameters:
- prefix ( str)
Returns: list[str]
aremove( path)
Async version of Storage.remove.
Parameters:
- path ( str)
Returns: None
aremove_dir( path)
Async version of Storage.remove_dir.
Parameters:
- path ( str)
Returns: None