Python bindings for the Corelink C++ client, built with pybind11 and scikit-build-core.
This package exposes selected Corelink C++ APIs to Python.
- Python ≥ 3.8
- A C++17 compiler (Clang, GCC, or MSVC)
- CMake ≥ 3.15
pip
,setuptools
,wheel
,Pybind11
Clone this repository and install into your Python environment:
cd */python-cpp-binding
# create & activate a venv (optional but recommended)
python3 -m venv venv
source venv/bin/activate
# build and install
pip install .
import corelink
p = corelink.Person("Kaikai", 20)
print(p.get_person())
age = p.get_age()
print(str(age))
print(corelink.hello())
corelink.hello_world()
p.change_name("Arthur")
print(p.get_person())
#output
Name: Kaikai age: 20
20
Hello from the corelink package, This code is written in python!
Hello from hello_world(), this code is written in cpp!
Name: Arthur age: 20