/kcl-py

KCL Python SDK

Primary LanguagePythonApache License 2.0Apache-2.0

KCL Artifact Library for Python

Sync from https://github.com/kcl-lang/lib/tree/main/python

Installation

python3 -m pip install kcl-lib

Quick Start

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)

Developing

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