Sync from https://github.com/kcl-lang/lib/tree/main/python
python3 -m pip install kcl-lib
import kcl_lib.api as api
args = api.ExecProgram_Args(k_filename_list=["./tests/test_data/schema.k"])
api = api.API()
result = api.exec_program(args)
print(result.yaml_result)
Setup virtualenv:
python3 -m venv venv
Activate venv:
source venv/bin/activate
Install maturin:
cargo install maturin
Build bindings:
maturin develop
Test
python3 -m pytest