roboto.http.requester#

Module Contents#

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

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

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

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)

classmethod for_tool(tool)#

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

Parameters:

tool (RobotoTool)

Return type:

RobotoRequester

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)

roboto_tool: RobotoTool | str | None = None#

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

roboto_tool_details: str | None = None#

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

roboto_tool_version: str | None = None#

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

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

Roboto Requester payload schema version, used to ensure backward compatibility

class roboto.http.requester.RobotoTool#

Bases: str, enum.Enum

Tool used to access Roboto

Cli = 'cli'#
Sdk = 'sdk'#
UploadAgent = 'upload-agent'#
Website = 'website'#
roboto.http.requester.roboto_version = '0.0.0'#