Skip to content

datalayer-examples/jupyterlab-running-sessions-example

Repository files navigation

Datalayer

Become a Sponsor

🪐 JupyterLab Running Sessions Example

JupyterLab Running Sessions Example.

Expose the RunningSessions of JupyterLab Lumino Widget as a React.js Component.

JupyterLab Running Sessions

This is what it takes to show the Running Sessions in your React Components.

import { Lumino } from "@datalayer/jupyter-react/lib/jupyter/lumino/Lumino";
import { RunningSessions } from '@jupyterlab/running';

export type RunningSessionsProps = {
  runningSessions: RunningSessions;
}

const JupyterLabRunningSessions = (props: RunningSessionsProps) => {
  const { runningSessions } = props;
  return (
    <div style={{margin: 10}}>
      <h1>This is a 🪐 Lumino Widget displayed as a ⚛️ React.js component.</h1>
      <Lumino>
        {runningSessions}
      </Lumino>
    </div>
  );
}

export default JupyterLabRunningSessions;

TODO

  • JupyterLabApp
  • JupyterLabAppHeadless

Develop

yarn && yarn build
pip install -e .[test]
jupyter labextension develop . --overwrite
jupyter labextension list
jupyter server extension list
yarn jupyterlab