Python
- Writing your
pyproject.toml - Pythonic, a memo of syntactic sugars to achieve Pythonic programming.
- Python HowTo
- Python Essays
- The Hitchhiker’s Guide to Python!, by Kenneth
Reitz, author of
requests - PyVideo
Implementations
- CPython, runs Python byte-code
- PyPy, translates Python to machine code with JIT compiler, more performant than CPython.
- Jython (for JVM) and IronPython (.NET)
- Numba, a JIT compiler that translates a subset of Python and NumPy.
- IPython, added interactive features, used in Jupyter Notebook
- Pyodide, and on top of which, PyScript (by Anaconda), translates Python to WASM.
Access to internal interpreter state is controlled by GIL, which only one Python thread can hold, therefore only one thread can run Python code at a time. However, built-int function or any extension written in C, or operates at Python/C API level, can release the GIL. System calls also release GIL.
Libraries
- TensorFlow and PyTorch
- Dask, to farm out work to local processes or clusters of machines.
- Python for data science.
- NumPy
- Pandas
- patsy, NumPy arrays with metadata, facilitating pre-modeling transformation.
- IPython and Jupyter Notebook
- Scipy
- scikit-learn, ML tools, prediction oriented.
- statsmodels, algorithms for classical statistics and econometrics, statistical inference oriented.
- Visualization
- matplotlib
- seaborn
- Altair, which uses Vega-Lite grammar.
- Plotly, with interactive plotting support.
- Bokeh, also interactive
Tooling
- Interpreter: IPython
- Notebooks
- Jupyter Notebook, traditional choice, supports Python, R, and Julia.
- Quarto, can be used as notebook, but is more of a publishing system and lacks interactivity.
- Marimo, the next-gen solution, addresses problems in traditional notebooks.
- StreamLit, developing data-drive apps with Python quickly.
- Python Debugging Bridge, and
cProfile - Profiling
- Builtin
cProfilemodule line-profilertool
- Builtin
- Environment management
- LSP: Rust based Pyrefly and
Ruff, note that Ruff doesn’t provide
autocompletion. Use with
ty.
Python will remain a dynamically typed language, and type hints should always be optional. — Guido
- Type Checkers
Mypy, originated in Dropbox, the official Python type-checker, written in Python.Pyrightby Microsoft, written in Python and TypeScriptPyre, and the latestPyreflyby Meta, written in RustPytypeby Google, written in Pythonty, built by Astral with Rust. Takes a gradual approach: a working software shouldn’t raise any errors when being type checked.