Session Info 2

0.4.1 · active · verified Tue Apr 14

Session Info 2 is a Python library that prints detailed version information for all currently imported packages and system details, useful for debugging and reproducibility. It's an improved successor to the original `session-info` library. The current version is 0.4.1, with releases occurring every few months to add features and improvements.

Warnings

Install

Imports

Quickstart

The most common way to use `session-info2` is to simply call `session_info.show()`. This will print a comprehensive summary of your Python environment, including package versions and system details, directly to the console. As of v0.4, you can also use the `.format()` method on the returned object for specific output types.

import session_info

# Print session information to stdout
session_info.show()

# To get formatted output (e.g., markdown) in v0.4+
# result = session_info.show(display_mode='text') # captures string for earlier versions
# print(result)

# In v0.4+, you can also chain .format()
# print(session_info.show().format('markdown'))

view raw JSON →