Skip to main content

A python library to control a Sky Q Box

Project description

Build Status docs pypi python license

A Python library for controlling a SkyQ Box.


This library aims to eventually provide API access to the Sky Q Set Top Box. It is only tested on Python 3.7 and uses the newer async support offered by this version of Python.

It uses the excellent trio async library and so knowledge of this is advised.

It is still a work in progress, but what is here, works.


To install:

pip install pyskyq


There are currently three main capabilities provided by the library.

Pressing buttons on the remote

Here is how to emulate a button-press on the SkyQ Remote. See the documentation for the class REMOTECOMMANDS for the various buttons that can be pressed.

from pyskyq import Remote, RCMD


Reacting to status changes on the box

Here is how to set up an async context manager that can be used to react to changed events on the box..

from pyskyq import get_status

async def report_box_online():
    """Report whether the SkyQ is online or not."""
    # pylint: disable=not-async-context-manager
    async with get_status('skyq') as stat:
        while True:
                print('The SkyQ Box is Online ')
                print('The SkyQ Box is Offline')
            await trio.sleep(1)
    print("Type Ctrl-C to exit.")
except KeyboardInterrupt:
    raise SystemExit(0)

Loading and interrogating channel data

Getting access to channel data requires initialising an EPG object. Once this is done, you need to load the channel data from the box using the EPG.load_skyq_channel_data() method.

To access this data use EPG.get_channel(). See the method’s documentation for the full list of available attributes.

from pyskyq import EPG

async def main():
    """Run main routine, allowing arguments to be passed."""
    pargs = parse_args(args)
    epg = EPG('skyq')  # replace with hostname / IP of your Sky box
    await epg.load_skyq_channel_data()  # load channel listing from Box.
    all_72_hour = XMLTVListing('')

    async with trio.open_nursery() as nursery:


    print('Channel Description from the SkyQ Box:')
    print('Channel XMLTV ID from the XMLTV Feed:')
    print('Channel Logo URL from the XMLTV Feed:')

if __name__ == "__main__":


Please refer to the documentation at


Contributions are welcome. Please fork the project on GitLab Not GitHub and raise an issue and merge request there.


Code and ideas obtained from:

Thank you to those individuals for their contributions.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyskyq-0.6.1.tar.gz (99.4 kB view hashes)

Uploaded Source

Built Distribution

pyskyq-0.6.1-py2.py3-none-any.whl (25.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page