reprexlite.session_info¶
Classes¶
Package
¶
Interface for adapting importlib.metadata.Distribution
instances for introspection by SessionInfo
.
Source code in reprexlite/session_info.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
SessionInfo
¶
Class for pretty-formatting Python session info. Includes details about your Python version, your operating system, and the Python packages installed in your current environment.
Attributes:
Name | Type | Description |
---|---|---|
python_version |
str
|
Python version for current session |
python_build_date |
str
|
Date |
os |
str
|
OS information for current session |
packages |
List[Package]
|
List of Python packages installed in current virtual environment. |
Source code in reprexlite/session_info.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
Functions¶
tabulate(rows: List[Tuple[str, str]]) -> List[str]
¶
Utility function for printing a two-column table as text with whitespace padding.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rows
|
List[Tuple[str, str]]
|
Rows of table as tuples of (left cell, right cell) |
required |
Returns:
Type | Description |
---|---|
List[str]
|
Rows of table formatted as strings with whitespace padding |
Source code in reprexlite/session_info.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|