Skip to main content

sinfo outputs version information for modules loaded in the current session, Python, and the OS.

Project description


Note the new name

The sinfo package has changed name and is now called session_info to become more discoverable and self-explanatory. The sinfo PyPI package will be kept around to avoid breaking old installs and you can downgrade to 0.3.2 if you want to use it without seeing this message. For the latest features and bug fixes, please install session_info instead. The usage and defaults also changed slightly, so please review the latest README at

sinfo outputs version information for modules loaded in the current session, Python, the OS, and the CPU. It is designed as a minimum measure to increase reproducibility and provides similar information as sessionInfo in R. The name is shortened to encourage regular usage through reduced typing =)


sinfo is particularly useful when conducting exploratory data analysis in Jupyter notebooks. Listing the version numbers of all loaded modules after importing them is a simple way to ensure a minimum level of reproducibility while requiring little additional effort. This practice is useful both when revisiting notebooks and when sharing them with colleagues. sinfo is meant to complement more robust practices such as frozen virtual environments, containers, and binder.


sinfo can be installed via pip install sinfo. It does not depend on a package manager to find version numbers since it fetches them from the module's version string. Its only dependency is stdlib_list, which is used to distinguish between standard library and third party modules.


import math

import natsort
import numpy
import pandas
from sinfo import sinfo



natsort     5.3.3
numpy       1.17.3
pandas      0.25.1
sinfo       0.3.0
Python 3.7.3 | packaged by conda-forge | (default, Dec  6 2019, 08:54:18) [GCC 7.3.0]
4 logical CPU cores
Session information updated at 2019-12-14 16:14

The default behavior is to only output modules not in the standard library, which is why the math module is omitted above (it can be included by specifying std_lib=True). To include not only the explicitly imported modules, but also any dependencies they import internally, specify dependencies=True. The notebook output is concealed in <details> tags by default to not take up too much visual real estate. When called from a notebook, sinfo writes the module dependencies to a file called to <notebook_name>-requirements.txt, which is compatible with pip install -r /path/to/requirements.txt. See the docstring for complete parameter info.


sinfo started as minor modifications of py_session, and as it grew it became convenient to create a new package. sinfo was built with the help of information provided in stackoverflow answers and existing similar packages, including

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sinfo-0.3.4.tar.gz (24.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page