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
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
File details
Details for the file legistream-backend-1.4.15.tar.gz
.
File metadata
- Download URL: legistream-backend-1.4.15.tar.gz
- Upload date:
- Size: 8.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c00dc4753df86e0c5554ccbc0b75a43c9b3fd65a6cd8b908760dd7ce4c6ec005 |
|
MD5 | 2155c9e450d51309cf943f857b534d0a |
|
BLAKE2b-256 | 6ef77ffde9d1758cd734dfc32ef2afaf65bb53be9c35cdbc651586170c1975a7 |
File details
Details for the file legistream_backend-1.4.15-py3-none-any.whl
.
File metadata
- Download URL: legistream_backend-1.4.15-py3-none-any.whl
- Upload date:
- Size: 17.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 174ef210a609bc527bc37ee59e379902d58f1656b5be19194b676f58dab68362 |
|
MD5 | 193ab04fbae4a8d29ee000322efd54f7 |
|
BLAKE2b-256 | d805a9c8bf75fbf85a8215fc2f668c1a3faaf7ff20bea072a4da5b9727359ee3 |