---
sidebar:
  label: roboto.progress
  order: 20
title: roboto.progress
---
## Module Contents

### NoopProgressMonitor

```python
class roboto.progress.NoopProgressMonitor
```

`from roboto.progress import NoopProgressMonitor`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L48-L63)

Bases: [`ProgressMonitor`](/docs/reference/python-sdk/roboto/progress#roboto.progress.ProgressMonitor)

Progress monitor that discards every report.

Methods such as [`download()`](/docs/reference/python-sdk/roboto/domain/files/file#roboto.domain.files.file.File.download) send their progress reports through it when the caller turns off progress output or a transfer has nothing to download, so most code never calls it. Its `is_closed` always returns `False`, even after `close`.

#### NoopProgressMonitor.close()

```python
def close()
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L59-L60)

Stop reporting progress, marking the transfer as finished.

#### NoopProgressMonitor.is_closed()

```python
def is_closed() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L62-L63)

Return whether `close` has been called.

**Returns**

- `bool`

#### NoopProgressMonitor.update()

```python
def update(uploaded_bytes: int)
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L56-L57)

Record that more of the transfer has completed.

**Parameters**

- **delta**: Number of bytes transferred since the previous call, not the running total.
- **uploaded_bytes** (`int`)

### ProgressMonitor

```python
class roboto.progress.ProgressMonitor
```

`from roboto.progress import ProgressMonitor`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L13-L45)

Bases: `abc.ABC`

Receiver of progress reports for a file upload or download, counted in bytes.

Methods such as [`download()`](/docs/reference/python-sdk/roboto/domain/files/file#roboto.domain.files.file.File.download) and [`upload_files()`](/docs/reference/python-sdk/roboto/domain/files/file_system#roboto.domain.files.file_system.FileSystem.upload_files) report a transfer's progress through it, passing its `update` method as the progress callback, so most code never calls it. Used as a context manager, it closes when the `with` block exits, including on an exception.

#### ProgressMonitor.close()

```python
@abstractmethod
def close()
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L32-L34)

Stop reporting progress, marking the transfer as finished.

#### ProgressMonitor.is_closed()

```python
@abstractmethod
def is_closed() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L37-L39)

Return whether `close` has been called.

**Returns**

- `bool`

#### ProgressMonitor.update()

```python
@abstractmethod
def update(delta: int)
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L23-L29)

Record that more of the transfer has completed.

**Parameters**

- **delta** (`int`): Number of bytes transferred since the previous call, not the running total.

### TqdmProgressMonitor

```python
class roboto.progress.TqdmProgressMonitor(
    total: int,
    desc: str,
    position: int = 0,
    leave: bool = True,
    unit: Optional[str] = 'B',
)
```

`from roboto.progress import TqdmProgressMonitor`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L66-L117)

Bases: [`ProgressMonitor`](/docs/reference/python-sdk/roboto/progress#roboto.progress.ProgressMonitor)

Progress monitor that draws a progress bar in the terminal, using the `tqdm` library.

The bar shows the percentage complete, the amount transferred and the total, the transfer rate, the elapsed time, and `desc`.

**Parameters**

- **total** (`int`): Size of the whole transfer, in `unit`.
- **desc** (`str`): Label printed at the end of the bar, such as `"Downloading 3 files"`.
- **position** (`int`): Line on which to draw the bar, counted from 0, so that several bars can show at once.
- **leave** (`bool`): Whether the bar stays on screen after the monitor closes.
- **unit** (`Optional[str]`): Unit of `total` and of each update. `"B"` shows sizes as kB, MB and up, in steps of 1024. `None` uses `tqdm`'s default unit, `"it"`.

#### TqdmProgressMonitor.close()

```python
def close()
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L112-L114)

Stop reporting progress, marking the transfer as finished.

#### TqdmProgressMonitor.is_closed()

```python
def is_closed() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L116-L117)

Return whether `close` has been called.

**Returns**

- `bool`

#### TqdmProgressMonitor.update()

```python
def update(uploaded_bytes: int)
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/progress.py#L109-L110)

Record that more of the transfer has completed.

**Parameters**

- **delta**: Number of bytes transferred since the previous call, not the running total.
- **uploaded_bytes** (`int`)
