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.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b28c8b6b6b57a053b66514fca0f04c4cfb5dcaf22b8b798b5cc64a38538d066 |
|
MD5 | d284faebab921281e6e5153d812989be |
|
BLAKE2b-256 | 191f4c77bd035058f1dd1f3128c1d33028d599e2fae3c34bf82728594ea2a4e6 |
Hashes for legistream_backend-1.4.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf6cb7d87a8c47eeb9b15acd7b29674275b48c1a57e7b3821e43e71520a5939 |
|
MD5 | 24ef44594b691931299ae40d3b5b0727 |
|
BLAKE2b-256 | 77eaea021cb244ed44e2fd20ce3cc878654192d2c796c2cec120c588fa058029 |