{"id":21494,"library":"jupyter-resource-usage","title":"Jupyter Resource Usage","description":"Jupyter extension displaying real-time memory, CPU, and disk usage for notebooks and the Jupyter server. Current version 1.2.1, released Dec 2024, with monthly releases.","status":"active","version":"1.2.1","language":"python","source_language":"en","source_url":"https://github.com/jupyter-server/jupyter-resource-usage","tags":["jupyter","memory","cpu","resource-monitoring","jupyterlab-extension"],"install":[{"cmd":"pip install jupyter-resource-usage","lang":"bash","label":"Install via pip"},{"cmd":"conda install -c conda-forge jupyter-resource-usage","lang":"bash","label":"Install via conda"}],"dependencies":[],"imports":[{"note":"Correct import path for Python package","symbol":"ResourceUsage","correct":"from jupyter_resource_usage import ResourceUsage"}],"quickstart":{"code":"from jupyter_resource_usage import ResourceUsage\n\n# Requires a running Jupyter server; the extension auto-activates\n# To fetch current resource usage:\nimport requests\nfrom notebook.auth import passwd\n\nresponse = requests.get(\n    'http://localhost:8888/api/metrics/v1',\n    headers={'Authorization': 'token ' + os.environ.get('JUPYTER_TOKEN', '')}\n)\nprint(response.json())\n","lang":"python","description":"Fetch resource usage metrics from the Jupyter server API."},"warnings":[{"fix":"Upgrade to JupyterLab 3+ or pin jupyter-resource-usage to 0.x.","message":"Version 1.0.0 moved from `jupyter-resource-usage` npm package to `@jupyter-server/resource-usage`. The Python package name changed from `jupyter-resource-usage` to `jupyter-server-resource-usage`? No, keep using jupyter-resource-usage. The breaking change is in the frontend extension. If you are using JupyterLab <3, you must pin to <1.0.0.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Install jupyterlab-system-monitor for granular per-kernel metrics.","message":"The extension only reports memory/CPU of the notebook server process, not individual kernels. For per-kernel usage, use `jupyterlab-system-monitor`.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the Jupyter Server's REST API with `psutil` directly for custom monitoring.","message":"The `/api/metrics/v1` endpoint is deprecated in favor of the Jupyter Server's `/api/kernels` and `psutil`-based metrics. Future versions may remove it.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install jupyter-resource-usage` to install the Python server extension.","cause":"Installed only the JupyterLab extension (npm) without the Python package.","error":"ModuleNotFoundError: No module named 'jupyter_resource_usage'"},{"fix":"Enable the extension with `jupyter server extension enable jupyter_resource_usage` and restart Jupyter.","cause":"The server extension is not enabled or the Jupyter config lacks required permissions.","error":"500 Internal Server Error on /api/metrics/v1"},{"fix":"The Python API is mainly for configuration; use `from jupyter_resource_usage import _load_jupyter_server_extension` if needed.","cause":"Trying to import a class that does not exist in the public API.","error":"ImportError: cannot import name 'ResourceUsage' from 'jupyter_resource_usage'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}