---
sidebar:
  label: roboto.http.requester
  order: 6
title: roboto.http.requester
---
## Module Contents

### ROBOTO_REQUESTER_HEADER

```python
roboto.http.requester.ROBOTO_REQUESTER_HEADER = 'X-Roboto-Requester'
```

`from roboto.http import ROBOTO_REQUESTER_HEADER`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/http/requester.py#L87-L87)

Header naming the program that sends the request, as a `RobotoRequester` in JSON.

Roboto ignores a value it cannot parse and handles the request as if the header were absent.

### RobotoRequester

```python
class roboto.http.requester.RobotoRequester(/, **data: Any)
```

`from roboto.http import RobotoRequester`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/http/requester.py#L38-L84)

Bases: `pydantic.BaseModel`

Description of the program sending a request to Roboto: the tool, its version, and the operating system.

A client set up with [`set_requester()`](/docs/reference/python-sdk/roboto/http/http_client#roboto.http.http_client.HttpClient.set_requester) sends it as JSON in the `ROBOTO_REQUESTER_HEADER` header of every request, so Roboto can tell which tools, versions and operating systems send requests, which helps debug them. Building one with a `schema_version` other than `"v1"` raises `pydantic.ValidationError`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **RobotoRequester.platform** (`str | None`) = `None`: Environment the request is sent from, or `None` when the sender does not report it.

  For a request from a browser, this is the browser's user agent. For a request from the SDK, it is the result of Python's `platform.platform()`.

- **RobotoRequester.roboto_tool** (`RobotoTool | str | None`) = `None`: Roboto tool the request is sent from, or `None` when it does not come from a Roboto tool.

- **RobotoRequester.roboto_tool_details** (`str | None`) = `None`: Free-text details about the tool named in `roboto_tool`, or `None` when there are none.

- **RobotoRequester.roboto_tool_version** (`str | None`) = `None`: Version of the tool named in `roboto_tool`, or `None` when the sender does not report it.

- **RobotoRequester.schema_version** (`Literal['v1']`) = `'v1'`: Format of the payload, always `"v1"`.

#### RobotoRequester.for_tool()

```python
@classmethod
def for_tool(tool: RobotoTool) -> RobotoRequester
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/http/requester.py#L67-L84)

Build the requester for a Roboto tool that sends requests through this SDK.

[`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env), the CLI and the Upload Agent describe themselves through it, so most code never calls it. It reports the operating system from `platform.platform()` and, as the tool's version, the installed SDK's version.

**Parameters**

- **tool** (`RobotoTool`): Roboto tool the requests are sent from.

**Returns**

- `RobotoRequester`

### RobotoTool

```python
class roboto.http.requester.RobotoTool
```

`from roboto.http import RobotoTool`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/http/requester.py#L22-L35)

Bases: `roboto.compat.StrEnum`

Roboto tool a request is sent from, as recorded in `RobotoRequester.roboto_tool`.

**Attributes**

- **RobotoTool.Cli** = `'cli'`: Roboto CLI.
- **RobotoTool.Sdk** = `'sdk'`: Roboto Python SDK.
- **RobotoTool.UploadAgent** = `'upload-agent'`: Roboto Upload Agent.
- **RobotoTool.Website** = `'website'`: Roboto web app.

### roboto_version

```python
roboto.http.requester.roboto_version = '0.0.0'
```

`from roboto.http.requester import roboto_version`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/http/requester.py#L19-L19)
