Storage

class testoot.base.TestootStorage[source]
abstract clear_if_exists()[source]
abstract clone(*, add_path: Optional[str] = None)[source]
abstract ensure_exists()[source]
abstract open_read(key: str, mode: str) → Optional[io.IOBase][source]
abstract open_write(key: str, mode: str) → io.IOBase[source]
class testoot.storages.LocalDirectoryStorage(root_dir)[source]

Local directory storage

__init__(root_dir)[source]

Initialize self. See help(type(self)) for accurate signature.

clear_if_exists()[source]

Clear storage if exists :return:

clone(*, add_path: Optional[str] = None)[source]
ensure_exists()[source]

Ensure local directory exists or create it :return:

open_read(key: str, mode: str) → Optional[io.IOBase][source]
open_write(key: str, mode: str) → io.IOBase[source]
property root_dir