Skip to main content

A JSON to JSON transform and templating language from Cognite

Project description

Python bindings for Kuiper

Python bindings for Kuiper so you can compile and run transformations from a Python runtime.

from kuiper import compile_expression

expression = compile_expression('{"theAnswer": input.numericValue + 27}', ["input"])
value = expression.run('{"numericValue": 15}')
print(value)

The compile_expression function might raise a KuiperCompileError, and otherwise returns a KuiperExpression object. The KuiperExpression.run(...) method might raise a KuiperRuntimeError. Both of these exceptions are subclasses of the KuiperError base class.

Development

We use PyO3 to create the bindings.

This project uses maturin to manage dependencies and such, instead of poetry. To set up your local development environment, first make sure maturin is installed:

pip install -U maturin

Then, you can enter or exit a virtual environment with the kuiper package installed by sourcing the enter.sh or exit.sh scripts:

source enter.sh
source exit.sh

Whenever you change the code, you need to rebuild. Instead of using cargo directly, use maturin:

maturin develop

This will build and install the python package into the current environment, which is the virtual environment created by the enter.sh script.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cognite_kuiper-0.14.3-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

cognite_kuiper-0.14.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cognite_kuiper-0.14.3-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cognite_kuiper-0.14.3-cp312-cp312-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

cognite_kuiper-0.14.3-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

cognite_kuiper-0.14.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cognite_kuiper-0.14.3-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cognite_kuiper-0.14.3-cp311-cp311-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

cognite_kuiper-0.14.3-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

cognite_kuiper-0.14.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cognite_kuiper-0.14.3-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cognite_kuiper-0.14.3-cp310-cp310-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file cognite_kuiper-0.14.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0b38f2181cec97363c6fc04ba30712f4f5e016bcbc37df2432da6f71bce369c7
MD5 a5d56abbe034fae4cb3ed9def4726af9
BLAKE2b-256 c78d08cb2917ec76528a2d48292326a2d84afe95c0895f575bee8cc68436eb31

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee0873429501c162ae1d64069026364bd60f9c15a812ceb23e2e4598b5fe1358
MD5 df76b15965fc0548ac870be7e3f6cfb6
BLAKE2b-256 3d5ca6345aa15536fa27f91c14bd99467d4422d6ab37e912acd3e44e71a13095

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bf7b9e229755500d2b796b3986d39ef90aa661f11e111a0469da1097c82fd760
MD5 a82b3a452a2882ce797210ae19082b67
BLAKE2b-256 b782d6c5881b1ba14266ae800ecdf8e11b0faa1ea041679d6e9227910e12b0ce

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0428db4c60f01a166c288d39feea02858bfad16b1ff663b2464510606d7d2a15
MD5 abb5472a888aaa8adfca41826b35e239
BLAKE2b-256 bbce5a899bdd7ca1589122b5f374ea9335f952f07468fcd8044bbcf7d0e269cd

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 07318f1bc0f45f190592688d5216bd284793cdcedf854842a266798770c9d6ec
MD5 c0afae6e06cde55ffcba6ebb7ade4aa6
BLAKE2b-256 164cc7e662b560436b3d1ee73bf12856d5d2fe324a3a5709c82e7fc07919f8b9

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 04982344689152da6c4cd865daccba7b4379e38ff65edb0a4cdca170e635d785
MD5 65f2fdc4e0054099cdbf9f08b0446921
BLAKE2b-256 9337f3ca87d7789bce395650581917fb22a91b70bff651a8607b9f284f05fa30

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae7e86c0382e56fe812d906b04f933a126cc051d53d5098f244ee8ea208b59c3
MD5 00ae5b5b762a4f823373632658050507
BLAKE2b-256 7e8bb1a4ed471f9d4297c370b7f5d64a82e4b85d2d104fc76982cb1b3b240c44

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6a2a88072c5e414c16a83d1a440a65ec5cc32da91781f90db40a7176c72d0bef
MD5 cb80acab70f8c4dba6949f82329f81bf
BLAKE2b-256 b17fd474507040be0fc37a3982a8f0983deea35c1271a10931fdb8cf2a2b2d76

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bb833a4a9c6cda57ec014b0c4260a77aac69a85aef0a6e658a2b5047cb5046da
MD5 8b870d0be3cf1833f58ba6cdb99039a6
BLAKE2b-256 e28425e74e1d152a0084021d1d2d1aa4b033f9d206abe11302d2656ca537c462

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1af49104229463e02fb32aee56ac50f15fd8fc1deefda93285f8d514fa4c5be
MD5 13788f4d55c18717c23a1dfdd6a54834
BLAKE2b-256 a7f5754eee6f81ba7a773bcfa4f4c063a4d7631a66d463ece50e2643811cb231

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15c14ddf587afb5456a454f9f544d86dd532814676b995883a2edcfbc98fc22a
MD5 326769c24a4455d092ae19bdd7aad5c0
BLAKE2b-256 9e515c693e842bb633e62214d55096142715e70d6009f32f4b8fd4c9e59e6e28

See more details on using hashes here.

File details

Details for the file cognite_kuiper-0.14.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4fddbfbc75f1fed7ca1da994b8ac5bcfdea144b198bad997a5b41856104b1f61
MD5 d3227a601e9b787f2fb9728e4c32dbb9
BLAKE2b-256 837aa13e6c0e4582aaaf8bc6f96d1f8374de3834d6ecb3910ed47fe42bd09081

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page