Module pyatv.const

Constants used in the public API.

Classes

class DeviceModel (value, names=None, *, module=None, qualname=None, type=None, start=1)

Hardware device model.

Gen2-Gen4K are Apple TV model names and will be renamed to AppleTVGenX in the future.

Ancestors

  • enum.Enum

Class variables

var AirPortExpress

Device model is AirPort Express (first generation).

var AirPortExpressGen2

Device model is AirPort Express (second generation).

var AppleTV4KGen2

Device model is sixth generation Apple TV (Apple TV 4K gen 2).

var Gen2

Device model is second generation Apple TV (Apple TV 2).

var Gen3

Device model is third generation Apple TV (Apple TV 3).

var Gen4

Device model is fourth generation Apple TV (Apple TV 4).

var Gen4K

Device model is fifth generation Apple TV (Apple TV 4K).

var HomePod

Device model is HomePod (first generation).

var HomePodMini

Device model is HomePod Mini (first generation).

var Music

Music app (or iTunes) running on a desktop computer.

var Unknown

Device model is unknown.

class DeviceState (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported device states.

Ancestors

  • enum.Enum

Class variables

var Idle

Device is idling, i.e. nothing is playing or about to play.

var Loading

Media is being loaded but not yet playing.

var Paused

Media is in paused state.

var Playing

Media is playing.

var Seeking

Media is seeking, e.g fast forward.

var Stopped

Media is stopped.

class FeatureName (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported features.

Ancestors

  • enum.Enum

Class variables

var Album

Album from playing artist.

var App

App playing media.

var AppList

List of launchable apps.

var Artist

Artist of playing song.

var Artwork

Playing media artwork.

var ContentIdentifier

Identifier for Content

var Down

Down button on remote.

var EpisodeNumber

Episode number of TV series.

var Genre

Genre of playing song.

var Home

Home/TV button.

var HomeHold

Long-press home button (deprecated: use RemoteControl.home).

var LaunchApp

Launch an app.

var Left

Left button on remote.

var Menu

Go back to previous menu.

var Next

Change to next item.

var Pause

Pause playing media.

var Play

Start playing media.

var PlayPause

Toggle between play/pause.

var PlayUrl

Stream a URL on device.

var Position

Current play time position.

var PowerState

Current device power state.

var Previous

Change to previous item.

var PushUpdates

Push updates are supported.

var Repeat

Repeat state.

var Right

Right button on remote.

var SeasonNumber

Season number of TV series.

var Select

Select current option.

var SeriesName

Title of TV series.

var SetPosition

Seek to position.

var SetRepeat

Change repeat state.

var SetShuffle

Change shuffle state.

var SetVolume

Set volume level.

var Shuffle

Shuffle state.

var SkipBackward

Skip backwards a time interval.

var SkipForward

Skip forward a time interval.

var Stop

Stop playing media.

var StreamFile

Stream local file to device.

var Suspend

Suspend device (deprecated; use Power.turn_off).

var Title

Title of playing media.

var TopMenu

Go to main menu.

var TotalTime

Total length of playing media (seconds).

var TurnOff

Turn off device.

var TurnOn

Turn device on.

var Up

Up button on remote.

var Volume

Current volume level.

var VolumeDown

Decrease volume.

var VolumeUp

Increase volume.

var WakeUp

Wake up device (deprecated; use Power.turn_on).

class FeatureState (value, names=None, *, module=None, qualname=None, type=None, start=1)

State of a particular feature.

Ancestors

  • enum.Enum

Class variables

var Available

Feature is supported and available.

var Unavailable

Feature is supported by device but not available now.

Pause is for instance unavailable if nothing is playing.

var Unknown

Feature is supported by device but it is not known if it is available or not.

var Unsupported

Device does not support this feature.

class InputAction (value, names=None, *, module=None, qualname=None, type=None, start=1)

Type of input when pressing a button.

Ancestors

  • enum.Enum

Class variables

var DoubleTap

Press and release twice quickly.

var Hold

Press and hold for one second before releasing.

var SingleTap

Press and release quickly.

class MediaType (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported media types.

Ancestors

  • enum.Enum

Class variables

var Music

Media type is music.

var TV

Media type is a TV show.

var Unknown

Media type is not known.

This can be either the case that nothing is playing or the app does not report a valid media type.

var Video

Media type is video.

class OperatingSystem (value, names=None, *, module=None, qualname=None, type=None, start=1)

Operating system on device.

Ancestors

  • enum.Enum

Class variables

var AirPortOS

Operating system is AirPortOS.

This OS is used by AirPort Express devices. It is not an official name but made up in pyatv as no official name has been found.

var Legacy

Operating system is Apple TV Software (pre-tvOS).

var TvOS

Operating system is tvOS.

var Unknown

Operating system is not known.

class PairingRequirement (value, names=None, *, module=None, qualname=None, type=None, start=1)

Pairing requirement for a service.

Ancestors

  • enum.Enum

Class variables

var Disabled

Pairing is disabled by protocol.

var Mandatory

Pairing must be performed.

var NotNeeded

Pairing is not needed.

var Optional

Pairing is supported but not required.

var Unsupported

Not supported by protocol or not implemented.

class PowerState (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported power states.

Ancestors

  • enum.Enum

Class variables

var Off

Device is turned off (standby).

var On

Device is turned on.

var Unknown

Power state is not determinable.

class Protocol (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported protocols.

Ancestors

  • enum.Enum

Class variables

var AirPlay

Protocol constant representing AirPlay.

var Companion

Protocol constant representing Companion link.

var DMAP

Protocol constant representing DMAP.

var MRP

Protocol constant representing MRP.

var RAOP

Protocol constant representing RAOP.

class RepeatState (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported repeat states.

Ancestors

  • enum.Enum

Class variables

var All

Repeat all tracks or items.

var Off

Repeat is off.

var Track

Repeat current track or item.

class ShuffleState (value, names=None, *, module=None, qualname=None, type=None, start=1)

All supported shuffle states.

Ancestors

  • enum.Enum

Class variables

var Albums

Shuffle on album level.

var Off

Shuffle is off.

var Songs

Shuffle on song level.