> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreep.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Usage

> Read storage and object counts with client.get_usage().

Storage consumed and object counts for the project.

```python theme={null}
usage = client.get_usage()

print(f"{usage.storage_bytes / 1024**3:.2f} GB")
print(f"{usage.image_count + usage.file_count} objects in {usage.folder_count} folders")
```

## Signature

```python theme={null}
client.get_usage(*, timeout=NOT_GIVEN) -> Usage
```

## Returns

```python theme={null}
usage.storage_bytes  # 4_823_117_002 — int
usage.image_count    # 1840
usage.file_count     # 265
usage.folder_count   # 37
```

`storage_bytes` is an `int`. The API sends it as a string, so arithmetic on it works
without converting first.

## Plan limits

This reports what you are using, not what you are allowed. A write that would cross a plan
ceiling fails with `DreepLimitError`, which carries the limit that was hit:

```python theme={null}
from dreep import DreepLimitError

try:
    client.upload(Path("hero.jpg"))
except DreepLimitError as error:
    print(f"{error.feature_key}: {error.used} of {error.limit}")
```

See [Errors & Retries](https://docs.dreep.cloud/python-sdk/errors.md) and the
[`GET /usage`](https://docs.dreep.cloud/api-reference/usage/get-limits) endpoint.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.