# ovok_sdk.storage

Canonical page: https://docs.ovok.com/python-sdk/reference/storage

Key-value storage the client keeps its session in.

## OvokStorage [#ovokstorage]

```python
OvokStorage()
```

Bases: `Protocol`

String storage for the session; implement it to persist sign-ins across restarts.

### get_item() [#get_item]

```python
get_item(key: str) -> str | None
```

Return the value stored under `key`, or None when there is none.

### set_item() [#set_item]

```python
set_item(key: str, value: str) -> None
```

Store `value` under `key`, replacing any earlier value.

### remove_item() [#remove_item]

```python
remove_item(key: str) -> None
```

Delete `key`; a missing key is not an error.

## MemoryStorage [#memorystorage]

```python
MemoryStorage()
```

In-process `OvokStorage`; the default, so sessions end with the process.

### get_item() [#get_item-1]

```python
get_item(key: str) -> str | None
```

Return the value stored under `key`, or None when there is none.

### set_item() [#set_item-1]

```python
set_item(key: str, value: str) -> None
```

Store `value` under `key`, replacing any earlier value.

### remove_item() [#remove_item-1]

```python
remove_item(key: str) -> None
```

Delete `key`; a missing key is not an error.
