sip
A Python bindings generator for C/C++ libraries
What it is and what it does
SIP is a toolchain for generating Python bindings that expose C and C++ libraries as Python extension modules. It processes human-readable `.sip` specification files (which resemble C/C++ headers) and generates the glue code needed to bridge Python and compiled C/C++ code. The generated modules can be packaged and distributed independently, and SIP includes a runtime module that provides support functions to the generated bindings.
Developers use SIP to either wrap existing C/C++ libraries for use in Python (as done for PyQt and wxPython) or to selectively reimplement performance-critical parts of Python applications in C/C++. The workflow involves writing or editing `.sip` files to describe the library interface, then using SIP's build tools to compile those specifications into extension modules.
Use it for:
- Wrapping a C/C++ library like Qt or wxWidgets to make it available as a Python package.
- Creating Python bindings for a custom C/C++ library to use in a Python application.
- Rewriting performance-critical sections of a Python application in C/C++ and exposing them via bindings.
- Distributing compiled extension modules as part of a Python package across multiple Python versions.
- Generating bindings that remain independent of the Python version used (for extension modules).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SIP generates Python bindings for C and C++ libraries by processing specification files and creating compiled extension modules that expose C/C++ code to Python.
Yes. SIP is actively maintained, has low install friction, carries no known vulnerabilities, and is permissively licensed. Install it if you need to generate Python bindings for C/C++ libraries or if you are using a package (like PyQt) that depends on it. Not needed for pure-Python development.
Install
sip on PyPI
pip
pip install sipuv
uv add sippoetry
poetry add sipInstalling sip
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release 12 days ago. Requires Python 3.10 or later and depends on three lightweight runtime packages: packaging, setuptools, and tomli.
License in practice
Licensed under BSD-2-Clause (permissive), allowing commercial and private use with minimal restrictions. Includes a bundled copy of ply under BSD-3-Clause, also permissive.
Quickstart
pip install sip
# Then use the sip build tool to process .sip specification files
# and generate C/C++ code that compiles into Python extension modules.
# The sip module is imported by the generated bindings at runtime.
Requires Python 3.10 or later. Building bindings requires a C/C++ compiler and the corresponding library headers for the target C/C++ library.
Verify before relying
- Whether the package includes pre-built wheels for all major platforms or requires compilation from source on some systems.
- Performance characteristics or benchmarks for generated bindings compared to other binding generators.
- Maturity and stability guarantees for the 6.16.0 release series.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — packaging, setuptools, tomli |
| Maintenance | actively maintained — 12 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 219,581/month — #9,324 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sip-6.16.0-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
PyQt5-sipPyQt5-sip provides the runtime support module…
permissive · top 5,000 on PyPI
PyQt6-sipPyQt6-sip provides the runtime support module…
permissive · top 5,000 on PyPI
pcppA pure Python implementation of a C99…
permissive · top 15,000 on PyPI
PyQt-builderPyQt-builder is a PEP 517 compliant build…
permissive · top 15,000 on PyPI
CppHeaderParserParses C++ header files and extracts their…
permissive · top 15,000 on PyPI
PyQt6PyQt6 provides Python bindings for Qt v6,…
copyleft · top 5,000 on PyPI
PyQt5PyQt5 provides Python bindings for the Qt v5…
copyleft · top 5,000 on PyPI
cppyCppy is a C++ header library that simplifies…
permissive · top 15,000 on PyPI
wxPythonwxPython provides Python bindings to the…
unclear · top 15,000 on PyPI
dbus-pythonProvides Python bindings to libdbus, allowing…
permissive · top 15,000 on PyPI