skillfed

sip

A Python bindings generator for C/C++ libraries

sip v6.16.0 219.6K downloads/30d#9,324 on PyPI63
Permissive license BSD-2-Clause Active released

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 sip

uv

uv add sip

poetry

poetry add sip

Installing 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

python bindings generator c++c library python wrapperpython extension module buildersip specification bindingsc++ to python bridgepython c bindings tool
c-bindingsextension-modulescode-generation

More Build Tools packages