watermark
IPython magic function to print date/time stamps and various system information.
What it is and what it does
Watermark is an IPython magic extension that captures and displays metadata about your computational environment. It works both as a magic command in Jupyter notebooks and IPython sessions (via %watermark) and as a callable function in regular Python code. The extension prints timestamps, Python implementation details, system information (OS, CPU, machine type), and versions of any packages you specify.
The package depends on ipython, importlib-metadata, and setuptools. It supports Python 3.7 and later and has been in production use since 2016. Common use cases include documenting notebook execution time, recording environment snapshots for reproducibility, and checking installed package versions at runtime.
Use it for:
- Add a timestamp and environment snapshot to the top of a Jupyter notebook for reproducibility tracking.
- Check versions of key dependencies (numpy, scipy, etc.) at runtime without separate import statements.
- Document system information (CPU cores, OS, Python version) in notebook output for debugging or reporting.
- Verify GPU availability and NVIDIA driver information in machine learning workflows.
- Track which Jupyter environment (Colab, VS Code, Jupyter Lab) a notebook is running in.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Watermark is an IPython magic extension that prints date/time stamps, Python and system version information, package versions, and hardware details in Jupyter notebooks and IPython sessions.
Yes. Watermark is a lightweight, stable utility with low install friction and no known vulnerabilities. It solves a real problem—capturing reproducible environment metadata—with a simple, well-established API. Install it if you work regularly in Jupyter notebooks or IPython and need to document or inspect your computational environment.
Install
watermark on PyPI
pip
pip install watermarkuv
uv add watermarkpoetry
poetry add watermarkInstalling watermark
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is aging (236 days since last release), but the repository remains active with recent commits and the package is marked Production/Stable.
License in practice
Licensed under the permissive BSD license, which allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install watermark
# In IPython/Jupyter:
%load_ext watermark
%watermark -v -m
# Or as a module:
from watermark import watermark
print(watermark(packages="numpy,scipy"))
Verify before relying
- Whether GPU information printing (--gpu flag) works reliably on non-NVIDIA hardware or if py3nvml is truly optional.
- How well the retrospective import capture (-iv flag) handles complex import patterns or dynamic imports.
Package facts
| License | newBSD (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — ipython, importlib-metadata, setuptools |
| Maintenance | aging — 236 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 121,838/month — #11,970 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: watermark-2.6.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
ipythonIPython is an enhanced interactive Python shell…
permissive · top 1,000 on PyPI
emr-notebooks-magicsProvides iPython magics for Amazon EMR…
permissive · top 5,000 on PyPI
session-infoOutputs version information for all modules…
permissive · top 15,000 on PyPI
mediapyMediapy reads, writes, and displays images and…
permissive · top 5,000 on PyPI
invisible-watermarkEmbeds and decodes invisible watermarks into…
permissive · top 15,000 on PyPI
jupyter-server-documentsA JupyterLab extension that moves document…
permissive · top 15,000 on PyPI
uuid-extensionGenerates UUID version 7…
unclear · top 15,000 on PyPI
ipython-pygments-lexersProvides Pygments syntax highlighters for…
permissive · top 1,000 on PyPI
resemble-perthEmbeds imperceptible watermarks into audio…
permissive · top 15,000 on PyPI
nbstripoutStrips output cells and metadata from Jupyter…
permissive · top 5,000 on PyPI