sigtools documentation

sigtools is a Python package that improves on introspection tools available for determining function signatures. This is useful for libraries or tooling that want to know how a function can be called: Documentation generators, IDEs, and tools that adapt themselves to functions they are given.

sigtools provides:

  • Utilities to boost introspection of callables’ signature

  • Backports of Python 3’s keyword-only parameters for code that used to maintain both Python 2 and 3 compatibility.

  • Utilities for combining functions, for instance for creating decorators

  • A Sphinx extension to make use of improved signature introspection in sphinx.ext.autodoc

Installing

You can install sigtools using pip. If in an activated virtualenv, type:

pip install sigtools

If you wish to do a user-wide install:

pip install --user sigtools