prospector 1.18.0


pip install prospector

  Latest version

Released: Feb 03, 2026


Meta
Author: Carl Crowder
Maintainer: Carl Crowder
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Environment
  • Console

Intended Audience
  • Developers

License
  • OSI Approved :: GNU General Public License v2 or later (GPLv2+)

Operating System
  • Unix

Programming Language
  • Python :: 3 :: Only
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • Software Development :: Quality Assurance
Latest Version of Prospector Build Status Test Coverage Documentation

About

Prospector is a tool to analyse Python code and output information about errors, potential problems, convention violations and complexity.

It brings together the functionality of other Python analysis tools such as Pylint, pycodestyle, and McCabe complexity. See the Supported Tools documentation section for a complete list.

The primary aim of Prospector is to be useful ‘out of the box’. A common complaint of other Python analysis tools is that it takes a long time to filter through which errors are relevant or interesting to your own coding style. Prospector provides some default profiles, which hopefully will provide a good starting point and will be useful straight away, and adapts the output depending on the libraries your project uses.

Installation

Prospector can be installed from PyPI using pip by running the following command:

pip install prospector

Optional dependencies for Prospector, such as pyroma can also be installed by running:

pip install prospector[with_pyroma]

Some shells (such as Zsh, the default shell of macOS Catalina) require brackets to be escaped:

pip install prospector\[with_pyroma\]

For a list of all of the optional dependencies, see the optional extras section on the ReadTheDocs page on Supported Tools Extras.

For local development, poetry is used. Check out the code, then run:

poetry install

And for extras:

poetry install -E with_everything

For more detailed information on installing the tool, see the installation section of the tool’s main page on ReadTheDocs.

Documentation

Full documentation is available at ReadTheDocs.

Usage

Simply run prospector from the root of your project:

prospector

This will output a list of messages pointing out potential problems or errors, for example:

prospector.tools.base (prospector/tools/base.py):
    L5:0 ToolBase: pylint - R0922
    Abstract class is only referenced 1 times

Options

Run prospector --help for a full list of options and their effects.

Output Format

The default output format of prospector is designed to be human readable. For parsing (for example, for reporting), you can use the --output-format json flag to get JSON-formatted output.

Profiles

Prospector is configurable using “profiles”. These are composable YAML files with directives to disable or enable tools or messages. For more information, read the documentation about profiles.

If your code uses frameworks and libraries

Often tools such as pylint find errors in code which is not an error, for example due to attributes of classes being created at run time by a library or framework used by your project. For example, by default, pylint will generate an error for Django models when accessing objects, as the objects attribute is not part of the Model class definition.

Prospector mitigates this by providing an understanding of these frameworks to the underlying tools.

Prospector will try to intuit which libraries your project uses by detecting dependencies and automatically turning on support for the requisite libraries. You can see which adaptors were run in the metadata section of the report.

If Prospector does not correctly detect your project’s dependencies, you can specify them manually from the commandline:

prospector --uses django celery

Additionally, if Prospector is automatically detecting a library that you do not in fact use, you can turn off autodetection completely:

prospector --no-autodetect

Note that as far as possible, these adaptors have been written as plugins or augmentations for the underlying tools so that they can be used without requiring Prospector. For example, the Django support is available as a pylint plugin.

Strictness

Prospector has a configurable ‘strictness’ level which will determine how harshly it searches for errors:

prospector --strictness high

Possible values are verylow, low, medium, high, veryhigh.

Prospector does not include documentation warnings by default, but you can turn this on using the --doc-warnings flag.

pre-commit

If you’d like Prospector to be run automatically when making changes to files in your Git repository, you can install pre-commit and add the following text to your repositories’ .pre-commit-config.yaml:

repos:
- repo: https://github.com/PyCQA/prospector
  rev: v1.16.1 # The version of Prospector to use, if not 'master' for latest
  hooks:
    - id: prospector

This only installs base prospector - if you also use optional tools, for example bandit and/or mypy, then you can add them to the hook configuration like so:

repos:
- repo: https://github.com/PyCQA/prospector
  rev: v1.16.1
  hooks:
    - id: prospector
      additional_dependencies:
        - ".[with_mypy,with_bandit]"
      args: [
        '--with-tool=mypy',
        '--with-tool=bandit',
        ]

Additional dependencies can be individually configured in your prospector.yml file :

# https://bandit.readthedocs.io/en/latest/config.html
bandit:
options:
    skips:
    - B201
    - B601
    - B610
    - B611
    - B703

# https://mypy.readthedocs.io/en/stable/command_line.html
mypy:
options:
    ignore-missing-imports: true

For prospector options which affect display only - those which are not configurable using a profile - these can be added as command line arguments to the hook. For example:

repos:
- repo: https://github.com/PyCQA/prospector
  rev: v1.16.1
  hooks:
    - id: prospector
      additional_dependencies:
        - ".[with_mypy,with_bandit]"
      args:
        - --with-tool=mypy
        - --with-tool=bandit
        - --summary-only
        - --zero-exit

License

Prospector is available under the GPLv2 License.

1.18.0 Feb 03, 2026
1.17.3 Aug 13, 2025
1.17.2 Jun 23, 2025
1.17.1 May 19, 2025
1.16.1 Mar 28, 2025
1.16.0 Mar 24, 2025
1.15.4a1 Mar 24, 2025
1.15.3 Mar 07, 2025
1.15.2 Feb 28, 2025
1.15.1 Feb 27, 2025
1.15.0 Feb 26, 2025
1.14.1 Feb 03, 2025
1.14.0 Jan 23, 2025
1.13.3 Nov 19, 2024
1.13.2 Nov 14, 2024
1.13.1 Nov 12, 2024
1.13.0 Nov 09, 2024
1.12.1 Oct 11, 2024
1.12.0 Oct 07, 2024
1.11.0 Oct 04, 2024
1.10.3 Oct 18, 2023
1.10.2 May 25, 2023
1.10.1 May 20, 2023
1.10.0 May 12, 2023
1.9.0 Feb 15, 2023
1.8.4 Jan 10, 2023
1.8.3 Dec 08, 2022
1.8.2 Dec 02, 2022
1.8.1 Dec 01, 2022
1.8.0 Dec 08, 2022
1.8.0rc1 Mar 18, 2022
1.8.0rc0 Mar 13, 2022
1.7.7 Mar 09, 2022
1.7.6 Mar 04, 2022
1.7.5 Mar 01, 2022
1.7.4 Feb 28, 2022
1.7.3 Feb 28, 2022
1.7.2 Feb 27, 2022
1.7.1 Feb 26, 2022
1.7.0 Feb 25, 2022
1.6.0 Jan 17, 2022
1.5.3.1 Dec 08, 2021
1.5.3 Dec 05, 2021
1.5.3.dev0 Nov 30, 2021
1.5.2 Nov 30, 2021
1.5.1 Sep 17, 2021
1.5.1b0 Sep 08, 2021
1.5.0.1 Aug 29, 2021
1.5.0 Aug 28, 2021
1.5.0.dev2 Aug 28, 2021
1.5.0.dev1 Aug 28, 2021
1.4.1.1 Aug 28, 2021
1.4.1 Aug 27, 2021
1.4.0 Aug 26, 2021
1.3.1 Oct 21, 2020
1.3.1.dev1 Aug 22, 2020
1.3.1.dev0 Aug 22, 2020
1.3.0 Jul 01, 2020
1.3.0.dev6 Jun 28, 2020
1.3.0.dev5 Jun 20, 2020
1.3.0.dev4 Jun 06, 2020
1.3.0.dev3 May 30, 2020
1.3.0.dev2 May 30, 2020
1.3.0.dev1 May 25, 2020
1.3.0.dev0 May 25, 2020
1.2.0 Dec 14, 2019
1.2.0.dev3 Nov 24, 2019
1.2.0.dev2 Nov 18, 2019
1.2.0.dev1 Nov 18, 2019
1.2.0.dev0 Jul 30, 2019
1.1.7 Jul 26, 2019
1.1.7.dev2 Jul 25, 2019
1.1.7.dev1 Jul 24, 2019
1.1.7.dev0 Jul 17, 2019
1.1.6.4 Jun 12, 2019
1.1.6.3 Jun 11, 2019
1.1.6.2 Nov 26, 2018
1.1.6.1 Nov 22, 2018
1.1.5 Nov 17, 2018
1.1.4 Oct 25, 2018
1.1.3 Oct 05, 2018
1.1.2 Aug 18, 2018
1.1.1 Jul 31, 2018
1.1 Jul 31, 2018
1.0 Jul 23, 2018
0.12.11 May 31, 2018
0.12.10 May 26, 2018
0.12.9 May 25, 2018
0.12.8 May 25, 2018
0.12.7 Jun 15, 2017
0.12.6 May 30, 2017
0.12.5 May 02, 2017
0.12.4 Oct 18, 2016
0.12.3 Sep 30, 2016
0.12.2 Aug 03, 2016
0.12 Jun 19, 2016
0.11.7 Dec 17, 2015
0.11.6 Dec 17, 2015
0.11.5 Dec 16, 2015
0.11.4 Dec 16, 2015
0.11.3 Dec 15, 2015
0.11.2 Dec 10, 2015
0.11.1 Dec 07, 2015
0.11 Dec 01, 2015
0.10.2 May 11, 2015
0.10.1 Apr 18, 2015
0.10 Mar 29, 2015
0.9.9 Feb 08, 2015
0.9.8 Feb 07, 2015
0.9.7 Feb 05, 2015
0.9.6 Feb 02, 2015
0.9.5 Feb 01, 2015
0.9.4 Feb 01, 2015
0.9.3 Feb 01, 2015
0.9.2 Jan 31, 2015
0.9.1 Jan 31, 2015
0.9 Jan 31, 2015
0.8.3 Jan 10, 2015
0.8.2 Jan 04, 2015
0.8.1 Jan 03, 2015
0.8 Jan 02, 2015
0.7.4 Nov 30, 2014
0.7.3 Nov 30, 2014
0.7.2 Oct 30, 2014
0.7.1 Oct 29, 2014
0.7 Oct 20, 2014
0.6.4 Sep 27, 2014
0.6.3 Sep 26, 2014
0.6.2 Sep 26, 2014
0.6.1 Sep 25, 2014
0.6 Sep 25, 2014
0.5.6 Jul 11, 2014
0.5.5 Jul 07, 2014
0.5.4 Jun 16, 2014
0.5.3 Jun 16, 2014
0.5.2 May 27, 2014
0.5.1 Feb 26, 2014
0.5 Jan 26, 2014
0.4.1 Jan 10, 2014
0.4 Jan 05, 2014
0.3.1 Dec 16, 2013
0.3 Dec 16, 2013
0.2 Nov 06, 2013
0.1 Oct 25, 2013

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
PyYAML
dodgy (<0.3.0,>=0.2.1)
mccabe (<0.8.0,>=0.7.0)
packaging
pep8-naming (<=0.10.0,>=0.3.3)
pycodestyle (>=2.9.0)
pydocstyle (>=2.0.0)
pyflakes (>=2.2.0)
pylint (>=4.0)
pylint-celery (==0.3)
pylint-django (>=2.6.1)
requirements-detector (>=1.5.0)
setoptconf-tmp (<0.4.0,>=0.3.1)
toml (<0.11.0,>=0.10.2)