--- layout: template title: API - pyatv.convert permalink: /api/convert/ link_group: api ---

# Module `pyatv.convert`

Various types of extraction and conversion functions.

Browse git

## Functions

`def device_state_str(state: DeviceState) -> str`

  Convert internal API device state to string.

`def media_type_str(mediatype: MediaType) -> str`

  Convert internal API media type to string.

`def model_str(device_model: DeviceModel) -> str`

  Convert device model to string.

`def protocol_str(protocol: Protocol) -> str`

  Convert internal API protocol to string.

`def repeat_str(state: RepeatState) -> str`

  Convert internal API repeat state to string.

`def shuffle_str(state: ShuffleState) -> str`

  Convert internal API shuffle state to string.