jupyterlab_twitch
A JupyterLab extension to display Twitch inline. It provides both a Twitch widget that can be displayed and modified via code, and a standalone Twitch player.
The goals of the project are to build out a method that allows for students to watch live streaming coding sessions and interact with an instructor from within their Jupyerlab. At present, it allows for embedding chat and video, but future developments will include deeper integration with chat using twitch-js.
Requirements
- JupyterLab >= 2.0
Install
jupyter labextension install @data-exp-lab/jupyterlab-twitch
Usage
You can either use the "Twitch" option in the command palette, which will prompt you for a Channel, or you can import and use the Twitch widget. Using the Twitch widget is preferred for most things, but it is also somewhat harder to move around.
import jupyterlab_twitch
player = jupyterlab_twitch.TwitchPlayerModel()
player.channel = "mst3k"
player.volume = 0.9
display(player)
Only a few attributes are exposed on the TwitchPlayerModel, and it will likely change its name as chat and other features are added. Right now you can change the channel, the volume, and mute or unmute. You can create a new output for the Twitch stream and drag that around, and you can also have multiple going.
This uses the IFrame embedding library, so may not work on non-localhost domains.
Style for the widget-based viewer is still a bit clunky, and will be worked on in subsequent versions.
Contributing
Install
The jlpm command is JupyterLab's pinned version of
yarn that is installed with JupyterLab. You may use
yarn or npm in lieu of jlpm below.
# Clone the repo to your local environment
# Move to jupyterlab_twitch directory
# Install dependencies
jlpm
# Build Typescript source
jlpm build
# Link your development version of the extension with JupyterLab
jupyter labextension link .
# Rebuild Typescript source after making changes
jlpm build
# Rebuild JupyterLab after making any changes
jupyter lab build
You can watch the source directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.
# Watch the source directory in another terminal tab
jlpm watch
# Run jupyterlab in watch mode in one terminal tab
jupyter lab --watch
Uninstall
jupyter labextension uninstall @data-exp-lab/jupyterlab-twitch
Metadata
Release files for jupyterlab-twitch 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyterlab_twitch-0.2.0.tar.gz | 158.0 kB | Without provenance | Details for jupyterlab_twitch-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyterlab_twitch-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jupyterlab_twitch-0.2.0-py3-none-any.whl |
Total release size: 318.9 kB
Release files / jupyterlab_twitch-0.2.0.tar.gz
| Download URL | jupyterlab_twitch-0.2.0.tar.gz |
|---|---|
| Size | 158.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bfc7071afb58ee9aff3ba36d14e4a56f72b80ad81ecde586378bb69e7b81061
|
|
BLAKE2b-256 checksum How to use checksums |
a3071b7e39cc2f6e840607681151b406c7349363fff5760d101151292cb846e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6
|
Release files / jupyterlab_twitch-0.2.0-py3-none-any.whl
| Download URL | jupyterlab_twitch-0.2.0-py3-none-any.whl |
|---|---|
| Size | 161.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5538a44a1f5bce657fa65d079cbb24130e71a1ca4b6f2427cc21fa20abc4cbc
|
|
BLAKE2b-256 checksum How to use checksums |
0e9284383c0c4719261a2ceed940817f52f2a2ae53c47438f1e23ee158f7419a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6
|
Security for jupyterlab-twitch 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.