Skip to main content

Get live stream metadata from the various Australian parliaments.

Project description

legistream_backend

This is the Python backend for legistream.


Install with pip:

pip install legistream-backend

View project on PyPI: https://pypi-hypernode.com/project/legistream-backend/.

Usage

This package uses different modules to get live stream data from the various Australian parliaments.

Currently supported parliaments:

  • Australian Capital Territory
  • Federal
  • New South Wales
  • Northern Territory
  • Queensland
  • South Australia
  • Tasmania
  • Victoria
  • Western Australia

Setup

Install required packages with pip3:

pip3 install -r requirements.txt


Install ffmpeg:

Linux

sudo apt install ffmpeg

Mac

Install with brew:

brew install ffmpeg

Windows

Official Windows builds of ffmpeg can be found here

Print out stream URLs:

Every parliament module returns data the same way, Victoria is used here only for example purposes.

The stream_urls property can be used to return streams as a dict:

from legistream_backend.vic import Stream

print(Stream().stream_urls)

Each URL can be returned individually by using the [house]_stream_url property (e.g lower_stream_url)

print(Stream().lower_stream_url)

Check if a parliament's house is live:

Similarly, you can check the status of a live stream with the [house]_is_live boolean property.

if(Stream().lower_is_live):
    print('The lower house of Victoria is currently live.')
else:
    print('The lower house of Victoria is not currently live.')

Notes

The South Australia stream extractor uses code adapted from the streamlink ustreamtv implementation.

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

legistream-backend-1.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

legistream_backend-1.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file legistream-backend-1.1.0.tar.gz.

File metadata

  • Download URL: legistream-backend-1.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for legistream-backend-1.1.0.tar.gz
Algorithm Hash digest
SHA256 39b4c563e230f6e8f4cc36a03c7d33a19c792112d2d5727e315e2bbb5fb49ee6
MD5 072a42aae34bac110c9cfaacd126577a
BLAKE2b-256 e1a930f8bb3889c5b81aba3072365f8fe747f8becc2e789d4b224795aaf67b80

See more details on using hashes here.

File details

Details for the file legistream_backend-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: legistream_backend-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for legistream_backend-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e36ce63e11b6aea385893b6d1a0777a3195ea4a54b976b630c93f3985f37631a
MD5 80fb401e1f9e065635302dc39d7f1eda
BLAKE2b-256 72f4e8ac23610ac65feb273a5933e4bdf41e48ed6a443f87d06a8cf09b26fcac

See more details on using hashes here.

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