sinfo outputs version information for modules loaded in the current session, Python, and the OS.
Note the new name
sinfopackage has changed name and is now called
session_infoto become more discoverable and self-explanatory. The
sinfoPyPI 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_infoinstead. The usage and defaults also changed slightly, so please review the latest README at https://gitlab.com/joelostblom/session_info.
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 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] Linux-5.4.2-arch1-1-x86_64-with-arch 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
std_lib=True). To include not only the explicitly imported
modules, but also any dependencies they import internally, specify
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,
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size sinfo-0.3.4.tar.gz (24.5 kB)||File type Source||Python version None||Upload date||Hashes View|