Registry / observability / session-info2

session-info2

JSON →
library0.4.1pypypi✓ verified 87d ago

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.

pip install session-info2
INSTALL
IMPORT
SIG · SESSION-INFO2
S
session-info2
observabilitypythonv0.4.1
Install
1.5s avg
Import
—
Disk
15MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 1.5s
py 3.11
✓ —
✓ 1.55s
py 3.12
✓ —
✓ 1.45s
py 3.13
✓ —
✓ 1.48s
py 3.9
✕ build_error
✕ build_error
15MB installed
● package 15MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SessionInfo
✓ from session_info2 import SessionInfo
✗ from session_info import show

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'))
Debug
Known issues
gotchaThis library (`session-info2`) is a distinct successor to the original `session-info` package. While the primary import module is similar (`session_info`), their implementations and features differ. Ensure you install `session-info2` if you intend to use the newer features and improved package discovery.
fix
Confirm you have installed `session-info2` (and not `session-info`) using `pip show session-info2`. If migrating, be aware of behavioral changes.
affects: All versions
breakingIn version 0.1.2, the default output format for `session_info.show()` changed from JSON to plain text (or rich terminal output). If your scripts relied on parsing JSON directly from the default output, you now need to explicitly specify `session_info.show(display_mode='json')`.
fix
For JSON output, call `session_info.show(display_mode='json')` or, for v0.4+, `print(session_info.show().format('json'))`.
affects: >=0.1.2
gotchaThe `.format('markdown' | 'html' | ...)` method was introduced in v0.4. If you are on an older version and need formatted output, you must use the `display_mode` argument directly, e.g., `session_info.show(display_mode='markdown')`.
fix
Upgrade to `session-info2>=0.4` to use the `.format()` method, or use `session_info.show(display_mode='...')` for older versions.
affects: <0.4
Upgrade
Version history
0.4.1latest on PyPI · released Apr 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
2
Resources
session-info2 — pip install session-info2 · libregistry