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.4.8.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

legistream_backend-1.4.8-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: legistream-backend-1.4.8.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.1

File hashes

Hashes for legistream-backend-1.4.8.tar.gz
Algorithm Hash digest
SHA256 4645d2b7bedd78f7bf86594ec120f2d896d36c1f5a9a0beb9c3cbaedc3f7028f
MD5 66cd8ee883b8f68b9f69a1e4c0315b13
BLAKE2b-256 d7a0ee06c180b7c1a881c06d2a04b54735b33a1a5568d4f60c2dd35ff5e818f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: legistream_backend-1.4.8-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.1

File hashes

Hashes for legistream_backend-1.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 52c5e3857a97f8c551393665d646e6d211b3265fd605bd1ea4c810747ae44469
MD5 5eb3349261440fdb83e75580a3e56937
BLAKE2b-256 9b565b3135e9a53511936473a009dfa1fe4a7f07421737e9c0495599e1b42891

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