--- id: ccimport version: "0.4.4" license: MIT license_treatment: permissive maintenance: dormant --- # ccimport — a tiny package for fast python c++ binding build. License: permissive · Maintenance: dormant · Downloads: 182.0K/mo ## What it is and what it does ccimport is a lightweight wrapper around pybind11 and ninja that compiles C++ source files into Python-importable modules on demand. Instead of writing a setup.py and running a separate build step, you call ccimport.ccimport() with your C++ source paths, output directory, and build configuration (includes, compiler flags, linker flags), and it handles compilation and loading in one go. It's designed for rapid iteration during development or for embedding C++ code directly in Python scripts without a formal build infrastructure. The package depends on pybind11 for C++-to-Python binding generation, ninja for fast parallel compilation, requests for potential network operations, and importlib-metadata for runtime package introspection. It requires Python 3.6 or later and a system C++ compiler. With dormant maintenance (last release 668 days ago) but no known vulnerabilities and a stable dependency chain, it remains usable for straightforward binding tasks, though long-term support is uncertain. Use it for: - Rapidly prototype C++ algorithms in Python without writing a full setup.py and build configuration. - Embed performance-critical C++ code directly in a Python script for one-off computation or testing. - Build Python bindings for existing C++ libraries during development without committing to a formal build system. - Automate C++ module compilation in a Python-based build or CI pipeline that needs dynamic compilation. - Teach or demonstrate C++ integration with Python in interactive environments without build boilerplate. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ccimport builds Python C++ bindings on-the-fly using pybind11 and ninja, letting you compile and import C++ code directly from Python without separate build steps. Yes, if you need fast on-demand C++ compilation for Python and are comfortable with dormant maintenance. The low install friction, permissive MIT license, stable dependencies, and zero known vulnerabilities make it safe to use. However, be aware that the last release was 668 days ago; if you encounter issues with newer Python or compiler versions, community support may be limited. Best suited for development workflows or one-off scripts rather than production systems requiring active maintenance. ## Install pip install ccimport uv add ccimport poetry add ccimport ## Installing ccimport Before you install: Low install friction with a pure-wheel distribution. Dormant maintenance status—last release was 668 days ago—but the repository remains active and the package has no known vulnerabilities. Depends on pybind11, ninja, requests, importlib-metadata, and dataclasses; all are stable, widely-used libraries. License in practice: MIT license is permissive and poses no restrictions on commercial or private use. You may use, modify, and distribute this package freely as long as you include the license notice. Quickstart: import ccimport build_meta = ccimport.BuildMeta() build_meta.add_global_includes(['/path/to/includes']) build_meta.add_global_cflags(['-O2']) lib = ccimport.ccimport(['/path/to/source.cpp'], '/output/path', build_meta) Requires a C++ compiler (g++, clang, or MSVC) and ninja build tool to be installed and available on your system PATH. Verify before relying: - Whether the package works with Python versions beyond 3.10, given the description mentions support only through 3.10. - Current state of compatibility with modern pybind11 and ninja versions, given dormant maintenance status. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 182.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python c++ binding builder, fast c++ compilation for python, pybind11 build automation, inline c++ compilation, dynamic c++ module loading, python native extension builder, c++ to python binding tool, c++-binding, build-automation, pybind11 [View on SkillFed](https://skillfed.io/packages/ccimport) · [View on PyPI](https://pypi.org/project/ccimport/)