DeviceAccess#

This CDP domain is experimental.

Types#

Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.

class RequestId[source]#

Device request id.

class DeviceId[source]#

A device id.

class PromptDevice(id_, name)[source]#

Device information displayed in a user prompt to select a device.

id_: DeviceId#
name: str#

Display name as it appears in a device request user prompt.

Commands#

Each command is a generator function. The return type Generator[x, y, z] indicates that the generator yields arguments of type x, it must be resumed with an argument of type y, and it returns type z. In this library, types x and y are the same for all commands, and z is the return type you should pay attention to. For more information, see Getting Started: Commands.

cancel_prompt(id_)[source]#

Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.

Parameters:

id

Return type:

Generator[Dict[str, Any], Dict[str, Any], None]

disable()[source]#

Disable events in this domain.

Return type:

Generator[Dict[str, Any], Dict[str, Any], None]

enable()[source]#

Enable events in this domain.

Return type:

Generator[Dict[str, Any], Dict[str, Any], None]

select_prompt(id_, device_id)[source]#

Select a device in response to a DeviceAccess.deviceRequestPrompted event.

Parameters:
Return type:

Generator[Dict[str, Any], Dict[str, Any], None]

Events#

Generally, you do not need to instantiate CDP events yourself. Instead, the API creates events for you and then you use the event’s attributes.

class DeviceRequestPrompted(id_, devices)[source]#

A device request opened a user prompt to select a device. Respond with the selectPrompt or cancelPrompt command.

id_: RequestId#
devices: List[PromptDevice]#