Skip to main content

sinfo

sinfo prints version information for loaded modules 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 =)

Installation

sinfo can be installed via pip install sinfo. It does not rely 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.

Usage

sinfo is versatile and particularly useful when conducting exploratory data analysis in Jupyter Notebooks. Listing the version numbers of all loaded modules in the last cell of a Notebook is a simple way to ensure a minimum level of reproducibility that requires little additional effort. This practice is useful when revisiting code and when sharing code with colleagues. sinfo is meant to complement more robust practices such as frozen virtual environments, containers and binder Notebooks. The default behavior is to only print modules from outside the standard library.

import math
import numpy
import pandas
import natsort
# Exploratory data analysis goes here...
# The last code cell of a Notebook.
import sinfo
sinfo.sinfo()

Output:

natsort         5.3.3
numpy           1.15.2
pandas          0.23.4
-----
Python 3.6.8 |Anaconda custom (64-bit)| (default, Dec 30 2018, 01:22:34) [GCC 7.3.0]
Linux-4.20.1-arch1-1-ARCH-x86_64-with-arch
-----
Session information updated at 2019-02-03 02:31

math is omitted since it is in the standard library, but can be included by specifying print_std_lib=True. To see not only the explicitly imported modules but also any dependencies they import, specify print_implicit=True. See the docstring for complete parameter info.


Background

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

Release files for sinfo 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinfo 0.1.4
File Size Uploaded
sinfo-0.1.4.tar.gz 21.4 kB Details

Release files / sinfo-0.1.4.tar.gz

Download URL sinfo-0.1.4.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d5ac26dc7a4f54330a937543462d6c1eb17498881b691b5ebb3e561baf991b
BLAKE2b-256 checksum
How to use checksums
0b208e65f9dc87c3f7401a14127df219f481b6f048e830e41bbed2845203c071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.8

Release history Release notifications | RSS feed

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

This release

0.1.4 This release

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page