contourpy
Python library for calculating contours of 2D quadrilateral grids
Install
contourpy on PyPI
pip
pip install contourpyuv
uv add contourpypoetry
poetry add contourpyPackage facts
| License | BSD 3-Clause License Copyright (c) 2021-2025, ContourPy Developers. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | actively maintained — 383 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl; contourpy-1.3.3-cp311-cp311-macosx_11_0_arm64.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; contourpy-1.3.3-cp311-cp311-musllinux_1_2_aarch64.whl; contourpy-1.3.3-cp311-cp311-musllinux_1_2_x86_64.whl; contourpy-1.3.3-cp311-cp311-win32.whl; contourpy-1.3.3-cp311-cp311-win_amd64.whl; contourpy-1.3.3-cp311-cp311-win_arm64.whl; contourpy-1.3.3-cp312-cp312-macosx_10_13_x86_64.whl; contourpy-1.3.3-cp312-cp312-macosx_11_0_arm64.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; contourpy-1.3.3-cp312-cp312-musllinux_1_2_aarch64.whl; contourpy-1.3.3-cp312-cp312-musllinux_1_2_x86_64.whl; contourpy-1.3.3-cp312-cp312-win32.whl
About contourpy
from the package's own PyPI description — quoted content, verbatim
<img alt="ContourPy" src="https://raw.githubusercontent.com/contourpy/contourpy/main/docs/_static/contourpy_logo_horiz.svg" height="90">
ContourPy is a Python library for calculating contours of 2D quadrilateral grids. It is written in C++11 and wrapped using pybind11.
It contains the 2005 and 2014 algorithms used in Matplotlib as well as a newer algorithm that includes more features and is available in both serial and multithreaded versions. It provides an easy way for Python libraries to use contouring algorithms without having to include Matplotlib as a dependency.
- Documentation: https://contourpy.readthedocs.io
- Source code: https://github.com/contourpy/contourpy
| Latest release | PyPI version (image) conda-forge version (image) |
| Downloads | PyPi downloads (image) |
| Python version | ... |
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
ContourPy calculates contours of 2D quadrilateral grids using C++11-accelerated algorithms, offering serial and multithreaded variants as a lightweight alternative to embedding Matplotlib for contouring tasks.
Medium install friction due to C++ compilation; however, extensive pre-built wheels cover Python 3.11–3.14 across macOS, Linux (multiple architectures), and Windows, reducing friction for standard platforms. Active maintenance with recent releases.
BSD 3-Clause License permits commercial and private use with minimal restrictions; redistribution requires preserving copyright notice and disclaimer. No copyleft obligations.
Usage
import numpy as np
from contourpy import ContourGenerator
x = np.arange(0, 10, 0.1)
y = np.arange(0, 10, 0.1)
X, Y = np.meshgrid(x, y)
Z = np.sin(X) * np.cos(Y)
cg = ContourGenerator(X, Y, Z)
contours = cg.lines(5.0)
Requires numpy; C++ extension compilation may be needed on platforms without pre-built wheels.
Verdict: Production-ready, actively maintained library with no known vulnerabilities and permissive licensing. Medium install friction is offset by broad wheel coverage and a single, lightweight runtime dependency (numpy). Suitable for scientific and visualization workflows requiring efficient contour extraction.
Needs verification
- Performance characteristics and multithreading scalability relative to Matplotlib's contouring.
- Whether the newer algorithm mentioned in the description offers measurable advantages for typical use cases.
Similar packages
permissive · top 1,000 on PyPI
fonttoolspermissive · top 1,000 on PyPI
seabornpermissive · top 1,000 on PyPI
matplotlibpermissive · top 1,000 on PyPI
matplotlib-inlinepermissive · top 1,000 on PyPI
joserfcpermissive · top 1,000 on PyPI
snowballstemmerpermissive · top 1,000 on PyPI
networkxpermissive · top 1,000 on PyPI
cyclerpermissive · top 1,000 on PyPI
scikit-imagepermissive · top 1,000 on PyPI