reprexlite.session_info¶
Classes¶
Package ¶
Package(distribution: Distribution)
Interface for adapting importlib.metadata.Distribution
instances for introspection by SessionInfo
.
Source code in reprexlite/session_info.py
44 45 |
|
SessionInfo ¶
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
17 18 19 20 21 22 23 24 |
|
Functions¶
tabulate ¶
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 |
|