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.org/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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for legistream-backend-1.4.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96499b582ad608f94029473cc3fecd6093aabfc48fda03dad0666421d76f8d8e |
|
MD5 | 1b45121c7747827699f23617412c4c98 |
|
BLAKE2b-256 | c41cdb48b92fd7a9d1937308a87cbfc90d19edaa827eb889adf66fe7e8b8585c |
Hashes for legistream_backend-1.4.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad571e73eafe6bc71763cfda497ca1b99654f96f95694df474af6ca74c60a891 |
|
MD5 | c9b20024d7fc0a7a8cde3a17bcc06ab2 |
|
BLAKE2b-256 | 93621f3c98129ea37c5d7b8a6229d6a7bae0601f993b959c1f92b4e48c1aaac7 |