Skip to content

python-developer-tooling-handbook/python-cpp-extension-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python C++ Extension Example

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.

Prerequisites

  • uv
  • A C++ compiler (g++, clang++, or MSVC)
  • CMake 3.15 or later

Getting Started

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'))"

License

MIT

About

Example Python library with a C++ extension using pybind11, scikit-build-core, and uv. Companion to pydevtools.com tutorial.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors