Skip to main content

Get live stream metadata from the various Australian parliaments.

Project description

legistream_backend

This is the Python backend for legistream.

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
  • South Australia
  • Tasmania
  • Victoria

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

Uploaded Source

Built Distributions

legistream_backend-0.7.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

legistream_backend-0.7.0-py2.py3-none-any.whl (14.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: legistream-backend-0.7.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.1

File hashes

Hashes for legistream-backend-0.7.0.tar.gz
Algorithm Hash digest
SHA256 f71d799213e452354e739b53b6ff71756a8d45c99cb9313efae4f92f86ac2815
MD5 ec0b191b6083d8621bfed81b4da50f0f
BLAKE2b-256 79f3efa2c6da99b8a6e16e1bba34db0170fad873a86308de311114d81c4ba30f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: legistream_backend-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.1

File hashes

Hashes for legistream_backend-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f4c3317e46763d13e76d0869961034fbb946d43f7d4f25619906148e1c0208c
MD5 ccac20ab9317195b53726e131775851c
BLAKE2b-256 8bc3d5c0a68004888abf11a8045c5d4e78ce109c3cf31ec0299d5b7209fa57dd

See more details on using hashes here.

File details

Details for the file legistream_backend-0.7.0-py2.py3-none-any.whl.

File metadata

  • Download URL: legistream_backend-0.7.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.1

File hashes

Hashes for legistream_backend-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f116f3defd24cd58fed5dc5737dbf115f5d8e8ea8c3c39f409f60242738a490d
MD5 b92929fd800af48291f916403375ad36
BLAKE2b-256 6207b2b2ee78ceaa1f516829bcdb05e6f7d15225b7c72c47718f5a232021dc2b

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