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

# Module `pyatv.core`

Core module of pyatv.

Browse git

## Classes

`class StateProducer (max_calls: int = 0)`

  Base class for objects announcing state changes to a listener.

  Initialize a new StateProducer instance.

  Browse git

  ### Ancestors

  - typing.Generic

  ### Subclasses

  - AppleTV
  - Power
  - PushUpdater
  - pyatv.mrp.connection.MrpConnection

  ### Instance variables

  `var listener -> ~StateListener`

    Return current listener object.

    Browse git

  ### Methods

  `def state_was_updated(self) -> None`

    Call when state was updated.

    Browse git