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:

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:

Returns: bool

astat( path)

Async version of Storage.stat.

Parameters:

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:

Returns: list[str]

aremove( path)

Async version of Storage.remove.

Parameters:

Returns: None

aremove_dir( path)

Async version of Storage.remove_dir.

Parameters:

Returns: None

Referenced by