A Python library with string utility functions implemented in C++, using pybind11 and scikit-build-core.
This is the companion repository for the Build a Python library with a C++ extension tutorial on the Python Developer Tooling Handbook.
- uv
- A C++ compiler (g++, clang++, or MSVC)
- CMake 3.15 or later
git clone https://github.com/python-developer-tooling-handbook/python-cpp-extension-example.git
cd python-cpp-extension-example
uv sync
uv run python -c "from string_utils import word_count; print(word_count('hello world'))"MIT