I tried to do the same thing using pybind11. It worked perfectly. Couldn't make it work for boost for some reason. Frustrating
pybind11