Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.http.requester

Module Contents

ROBOTO_REQUESTER_HEADER

roboto.http.requester.ROBOTO_REQUESTER_HEADER = 'X-Roboto-Requester'#View Source

A JSON serialized RobotoRequester representing the entity making a request to Roboto.

RobotoRequester

class roboto.http.requester.RobotoRequester(/, **data)#View Source

Bases: pydantic.BaseModel

Details about the entity making a request to Roboto. These are embedded in a header in order to see what tool versions / operating systems are making requests, and to aid debugging.

Parameters

data Any

RobotoRequester.for_tool()

classmethod for_tool(tool)#View Source

Called to intelligently populate a RobotoRequester for a request made from a named Roboto tool using the Python SDK.

Parameters

Return type

Attributes

RobotoRequester.platform

platform str | None = None #

The environment in which a request is being made, i.e. the user agent (for browser requests) or the results of platform.platform (for SDK requests)

RobotoRequester.roboto_tool

roboto_tool RobotoTool | str | None = None #

If a request is being made from a Roboto vended tool, the name of the tool

RobotoRequester.roboto_tool_details

roboto_tool_details str | None = None #

If a request is being made from a Roboto vended tool, free text pertinent details about the tool

RobotoRequester.roboto_tool_version

roboto_tool_version str | None = None #

If a request is being made from a Roboto vended tool, the version of the tool

RobotoRequester.schema_version

schema_version Literal['v1'] = 'v1' #

Roboto Requester payload schema version, used to ensure backward compatibility

RobotoTool

class roboto.http.requester.RobotoTool#View Source

Bases: roboto.compat.StrEnum

Tool used to access Roboto

Attributes

RobotoTool.Cli

Cli = 'cli' #

RobotoTool.Sdk

Sdk = 'sdk' #

RobotoTool.UploadAgent

UploadAgent = 'upload-agent' #

RobotoTool.Website

Website = 'website' #

roboto_version

roboto.http.requester.roboto_version = '0.0.0'#View Source

Was this page helpful?