Skip to content

Tools for Python programming

Code formatting

  • Black: code formatter for Python (very opinionated).

Linting and static analysis

  • flake8: tool to enforce adherence to the Python style guide.
  • mypy: if your code has type annotations, mypy will check for correctness.
  • pylint: static code analyzer that also checks for documentation and style.

Package managers

  • miniconda: Python package manager.
  • mamba: Python package manager.
  • Poetry: environment management, build and deployment of Python projects.

Configuration files

  • Hydra: configuration management tool that allows you to compose complex configurations from simple pieces.

Testing

  • pytest: unit testing framework.
  • hypothesis: property-based testing for Python, it also allows for fuzz testing.

Profiling

  • CProfile is a profiler that is part of Python's standard library.
  • snakeviz is a viewer for cProfile output.
  • line_profiler is a line-by-line profiler.
  • memory_profiler is a memory profiler, it allows how much memory is used line-by-line in your code.

Language interoperability

  • Cython: a superset of Python that allows you to write C extensions for Python.
  • Pybind11: a header-only library that exposes C++ types in Python.
  • SWIG: a tool that generates C++ wrappers for Python.
  • Scikit-build: a build system generator for CMake that allows you to build C++ extensions for Python.
  • F2PY3: a tool that allows you to wrap Fortran code for Python.

Build tools

  • Poetry: environment management, build and deployment of Python projects.