Module pyatv
Main routines for interacting with an Apple TV.
Sub-modules
pyatv.conf
-
Configuration used when connecting to a device …
pyatv.const
-
Constants used in the public API.
pyatv.convert
-
Various types of extraction and conversion functions.
pyatv.exceptions
-
Local exceptions used by library.
pyatv.helpers
-
Various helper methods.
pyatv.interface
-
Public interface exposed by library …
Functions
-
async def connect(config: AppleTV, loop: asyncio.events.AbstractEventLoop, protocol: Protocol = None, session: aiohttp.client.ClientSession = None) -> AppleTV
-
Connect to a device based on a configuration.
-
async def pair(config: AppleTV, protocol: Protocol, loop: asyncio.events.AbstractEventLoop, session: aiohttp.client.ClientSession = None, **kwargs)
-
Pair a protocol for an Apple TV.
-
async def scan(loop: asyncio.events.AbstractEventLoop, timeout: int = 5, identifier: str = None, protocol: Optional[Protocol, Set[Protocol]] = None, hosts: List[str] = None) -> List[AppleTV]
-
Scan for Apple TVs on network and return their configurations.
Classes
class ProtocolImpl (setup: Callable[[asyncio.events.AbstractEventLoop, AppleTV, Dict[Any, pyatv.support.relayer.Relayer], StateProducer, pyatv.support.http.ClientSessionManager], Optional[Tuple[Callable[[], Awaitable[NoneType]], Callable[[]], Set[FeatureName]]]], scan: Callable[[], Mapping[str, Callable[[pyatv.support.mdns.Service, pyatv.support.mdns.Response], Optional[Tuple[str, BaseService]]]]], pair: Optional[Callable[..., PairingHandler]])
-
Represent implementation of a protocol.
Ancestors
- builtins.tuple
Instance variables
var pair -> Optional[Callable[..., PairingHandler]]
-
Alias for field number 2
var scan -> Callable[[], Mapping[str, Callable[[pyatv.support.mdns.Service, pyatv.support.mdns.Response], Optional[Tuple[str, BaseService]]]]]
-
Alias for field number 1
var setup -> Callable[[asyncio.events.AbstractEventLoop, AppleTV, Dict[Any, pyatv.support.relayer.Relayer], StateProducer, pyatv.support.http.ClientSessionManager], Optional[Tuple[Callable[[], Awaitable[NoneType]], Callable[[]], Set[FeatureName]]]]
-
Alias for field number 0