semvec/pypi-packages huggingface dataset:
borco-nanobind-example 0.0.3
Example creating a Python binding for C++ with nanobind
License: MIT License
Requires Python: >=3.12
Keywords: c++, cmake, cpp, cxx, example, nanobind, python, scikit-build-core

# nanobind example

Example creating a Python binding for C++ with
[nanobind](https://github.com/wjakob/nanobind). Based on the
[nanobind docs](https://nanobind.readthedocs.io/en/latest/index.html).

## Using the bindings

```bash
$ uv venv --python 3.12
$ uv pip install borco-nanobind-example
$ uv run python
>>> import borco_nanobind_example as ex
>>> ex.Dog("Max").bark()
'Max: woof!'
>>> ex.the_answer
42
>>> ex.add(3)
4
>>> ex.add(3, 4)
7
```