Skip to content

ka1kqi/python-cpp-binding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corelink Sample Binding

Python bindings for the Corelink C++ client, built with pybind11 and scikit-build-core.

This package exposes selected Corelink C++ APIs to Python.


📦 Installation

Requirements

  • Python ≥ 3.8
  • A C++17 compiler (Clang, GCC, or MSVC)
  • CMake ≥ 3.15
  • pip, setuptools, wheel, Pybind11

Install from source

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 .

Usage

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

About

simple python to cpp binding, poc for NYU HSRN corelink python-cpp binding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published