Skip to main content
2025 Python Packaging Survey is now live!  Take the survey now

Utilities for writing C++ extension modules.

Project description

GitHub Actions status https://badge.fury.io/py/libpy.svg

libpy is a library to help you write amazing Python extensions in C++. libpy makes it easy to expose C++ code to Python. libpy lets you automatically wrap functions and classes. libpy is designed for high performance and safety: libpy extension modules should be both faster and safer than using the C API directly.

Full documentation

Requirements

libpy supports:

  • macOS/Linux

  • Python >=3.5

libpy requires:

  • gcc>=9 or clang>=10

  • numpy>=1.11.3

Optional Requirements

libpy optionally provides wrappers for the following libraries:

  • google sparsehash

Install

To install for development:

$ make

Otherwise, pip install libpy, making sure CC and CXX environment variables are set to the the right compiler.

Tests

To run the unit tests, invoke:

$ make test

Supported by

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