tbenthompson/cppimport
Import C++ files directly from Python! observed · 2026-08-28
Health v2 · maintenance only
71/100
- Activity 77
- Release rhythm 48
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3765
- days_rel: 138
- days_push: 138
- n_releases_24m: 1
Adoption not part of the score
1228 stars · 74 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
cppimport is a Python library that lets you import C++ files directly as Python extension modules, compiling them transparently on first import using pybind11. It supports Mako-templated build configuration and automatic recompilation when source files change.
Use cases
- import c++ code from python directly
- speed up slow python functions with c++
- compile pybind11 extension modules on import
- transparent recompilation of c++ files in python workflow
- quickly build python bindings for c++ code
When to choose
- you want to call C++ code from Python without writing a separate build system
- you're prototyping performance-critical functions and want edit-and-run iteration
- you already use pybind11 and want a frictionless import workflow
When to avoid
- you need a production build system with fine-grained control - use CMake or setuptools instead
- your project doesn't involve C++ extensions
- compile-on-import latency is unacceptable for your deployment
Facets
library · maturity active
build-tool developer-tools compiler developer-tools programming-languages performance python cpp cross-platform pybind11 import-hook python-c-bindings jit-compilation extension-modules
2 sources
- readme: https://github.com/tbenthompson/cppimport · fetched 2026-08-28 · 7b09111dfb5e
- registry_pypi: https://pypi.org/pypi/cppimport/json · fetched 2026-08-29 · 7b1d947f78dd
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| tbenthompson/cppimport | main | 71 |
For agents
markdown · JSON · MCP: product_card(name="tbenthompson/cppimport")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem