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
  • 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-0.9.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

legistream_backend-0.9.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: legistream-backend-0.9.1.tar.gz
  • Upload date:
  • Size: 6.9 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.9.1.tar.gz
Algorithm Hash digest
SHA256 091cffbcf8bdec3712ddf5365419d1dd25f6105af0e83de019957d88fe755bde
MD5 ded81a220c65ca532e820b26bdb69b18
BLAKE2b-256 4707096ea8263c6983e5d37001e83f28c5e671e1e43406fb9688b39446a14850

See more details on using hashes here.

File details

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

File metadata

  • Download URL: legistream_backend-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5e0726bacd79aa15e34ba5e77f7ff6631b71a59b5229778dc68e5266052b9f2
MD5 3f1099662d091b27c45dbf32cd6b2a31
BLAKE2b-256 d997b4f634be68cc3a3f4991cbbf3456c6e8d9dc366f0e3a1c85a96ef1534d4a

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