Python

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

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
  • Environment management
    • venv, virtualenv, pyenv, pyenv-virtualenv, pipenv, and now the Rust based uv
    • uv is definitely becoming the future.
    • For toolkit-like global named env management, mamba is still an appealing option. We also have pixi,
  • 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.
    • Pyright by Microsoft, written in Python and TypeScript
    • Pyre, and the latest Pyrefly by Meta, written in Rust
    • Pytype by Google, written in Python
    • ty, built by Astral with Rust. Takes a gradual approach: a working software shouldn’t raise any errors when being type checked.