Skip to main content

A Python bindings generator for C/C++ libraries

Project description

What is SIP?

One of the features of Python that makes it so powerful is the ability to take existing libraries, written in C or C++, and make them available as Python extension modules. Such extension modules are often called bindings for the library.

SIP is a collection of tools that makes it very easy to create Python bindings for C and C++ libraries. It was originally developed in 1998 to create PyQt, the Python bindings for the Qt toolkit, but can be used to create bindings for any C or C++ library. For example it is also used to generate wxPython, the Python bindings for wxWidgets.

SIP comprises a set of build tools and a sip module. The build tools process a set of specification files and generates C or C++ code which is then compiled to create the bindings extension module. Several extension modules may be installed in the same Python package. Extension modules can be built so that they are are independent of the version of Python being used. In other words a wheel created from them can be installed with any version of Python starting with v3.8.

The specification files contain a description of the interface of the C or C++ library, i.e. the classes, methods, functions and variables. The format of a specification file is almost identical to a C or C++ header file, so much so that the easiest way of creating a specification file is to edit a copy of the corresponding header file.

The sip module provides support functions to the automatically generated code. The sip module is installed as part of the same Python package as the generated extension modules. Unlike the extension modules the sip module is specific to a particular version of Python (e.g. v3.8, v3.9, v3.10, v3.11).

SIP makes it easy to exploit existing C or C++ libraries in a productive interpretive programming environment. SIP also makes it easy to take a Python application (maybe a prototype) and selectively implement parts of the application (maybe for performance reasons) in C or C++.

Author

SIP is copyright (c) Riverbank Computing Limited. Its homepage is https://www.riverbankcomputing.com/software/sip/.

Support may be obtained from the PyQt mailing list at https://www.riverbankcomputing.com/mailman/listinfo/pyqt/.

License

SIP is released under the GPL v2, GPL v3 licenses, and under a license similar to the BSD license.

Installation

SIP can be installed from PyPI:

pip install sip

Documentation

The documentation for the latest release can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sip-6.8.0.tar.gz (985.6 kB view details)

Uploaded Source

Built Distribution

sip-6.8.0-py3-none-any.whl (573.1 kB view details)

Uploaded Python 3

File details

Details for the file sip-6.8.0.tar.gz.

File metadata

  • Download URL: sip-6.8.0.tar.gz
  • Upload date:
  • Size: 985.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for sip-6.8.0.tar.gz
Algorithm Hash digest
SHA256 2ed1904820cb661b7207eb1dccfaebec1a5463dcad903ba448ad1945502d089c
MD5 a3ec0c6277de89b1830770dc2294caa2
BLAKE2b-256 723465d7891ea2c1232155bc0ccc5fac6db0d1baba184e17b494148bd42cc1a2

See more details on using hashes here.

File details

Details for the file sip-6.8.0-py3-none-any.whl.

File metadata

  • Download URL: sip-6.8.0-py3-none-any.whl
  • Upload date:
  • Size: 573.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for sip-6.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5da5638ed88ee95cb800c5a1bb3f2217f8ca21d93750e10aa171f2d0280ac0e2
MD5 40b7d1feb1459a42ca8abf21a10b4da5
BLAKE2b-256 22dd55a69862572792e7725c11210ac42557e4f2898f101ed14dfbe6ce7872fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page