Skip to content
Portfolio

Python Libraries Cheat Sheet

These are common Python libraries for interactive work and terminal output. Install them inside a virtual environment to keep dependencies isolated per project.

Rich formats terminal output with colors, tables, progress bars, panels, and syntax-highlighted tracebacks. Use it in CLI tools and scripts when plain print() is not enough.

Terminal window
pip install rich

Colored output:

from rich import print
print("[bold green]OK[/] [red]Error[/]")

IPython is an enhanced interactive Python shell (REPL). It adds tab completion, ? help, %magic commands, and better object inspection compared to the standard python interpreter.

Terminal window
pip install ipython
Terminal window
ipython
%pwd # print working directory
%run script.py # execute a Python file
%timeit sum(range(100)) # benchmark an expression
obj? # show help for an object

IPython is also the kernel that powers Jupyter notebooks.

JupyterLab is a web-based IDE for notebooks, terminals, and file browsing. It is the primary environment for exploratory Python and data work.

Terminal window
pip install jupyterlab
Terminal window
jupyter lab

This opens the JupyterLab UI in your browser. From there you can create .ipynb notebooks with code and markdown cells, run them cell by cell, and inspect outputs inline.

JupyterLab uses IPython as its Python kernel. You can also use Rich inside notebook cells for formatted terminal-style output.