--- id: session-info2 version: "0.4.2" license: MPL-2.0 license_treatment: copyleft maintenance: active --- # session-info2 — Print versions of imported packages. License: copyleft · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does session-info2 is a utility for capturing and printing the versions of all packages imported in your Python environment. It works both as a command-line tool and as a library you can call from scripts or notebooks. The core use case is documenting your environment's dependency state for reproducibility—particularly useful in Jupyter notebooks where you want to record what versions were active when you ran an analysis. The package has no runtime dependencies and works by introspecting the imported modules in your current session. You can call it with options to include or exclude OS info, list indirect dependencies, or format the output in different ways. It supports Python 3.12 and later, including PyPy, and is actively maintained. Use it for: - Document the exact package versions used in a Jupyter notebook for reproducibility and sharing. - Generate a dependency snapshot at the start of a script to include in logs or reports. - Verify that a specific package version is loaded in your current session before running code. - Compare environment states across different machines or CI/CD runs by capturing session info at key points. - Include environment metadata in bug reports or issue discussions to help others reproduce problems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Captures and displays the versions of all imported packages in your Python environment, useful for documenting reproducible setups in notebooks and scripts. Yes. Low install friction, no dependencies, active maintenance, and no known vulnerabilities. The copyleft license (MPL-2.0) is permissive for use and modification. Useful for anyone working in notebooks or scripts who needs to track or document their environment state. ## Install pip install session-info2 uv add session-info2 poetry add session-info2 ## Installing session-info2 Before you install: Low friction: pure Python wheel with no runtime dependencies. Active maintenance with last commit 2026-08-11. Requires Python 3.12 or later. License in practice: Licensed under MPL-2.0 (copyleft). You may use and modify the package freely, but any modifications must be released under the same license if distributed. Quickstart: pip install session-info2 from session_info2 import session_info session_info() Requires Python 3.12 or later. Verify before relying: - Whether the CLI tool (`session-info` command) works identically to the programmatic API or has different output modes. - How the package handles packages installed in editable mode or from non-standard sources. - Performance characteristics when run on environments with hundreds of installed packages. ## Package facts - License: MPL-2.0 (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags package version reporting, session info jupyter, environment reproducibility, dependency version tracking, python package versions, notebook environment snapshot, installed package list, reproducibility, jupyter-friendly, environment-inspection [View on SkillFed](https://skillfed.io/packages/session-info2) · [View on PyPI](https://pypi.org/project/session-info2/)