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.2-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

cognite_kuiper-0.14.2-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.2-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cognite_kuiper-0.14.2-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.2-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

cognite_kuiper-0.14.2-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.2-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cognite_kuiper-0.14.2-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.2-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

cognite_kuiper-0.14.2-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.2-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cognite_kuiper-0.14.2-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.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 97f82e5cffc0966acc04ef40d6f9f4760411edeadb18b315f63364f4a67bcf77
MD5 7de6146f959ea3c5a506f431ff5c957e
BLAKE2b-256 cac3bde5744ebbcff0220b37d4f3c6b587d4a0e0f7e1518eef9c548fcf185e10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b86b3a07ba0c49c7d710af8ec5fe5b4d563ae88392f1350c5c4f8f08ec4cef98
MD5 721f4b755e9e765831f4b0b8f3dbb67f
BLAKE2b-256 c9cca5d5fde5c571ba95e825ef3d8e01894784df9f2f27c38009a51454ffa42e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1bc15740140b2cf473d03f19f882831b590284f38c6c86627fced41006cd1ba6
MD5 b85c73e8201b421978d6cc877cf297be
BLAKE2b-256 8c8d2cae6060a2c5e2b5482f3579d26ff5d4f5f7179691cda1182df371e3d0de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cc6b3faece83789288ee69beeb1136bd411b30aa0b1c69ec4ed38a0708593a07
MD5 9367fa95e537671ca828459ae38b0279
BLAKE2b-256 8f0496eceb0635131d24c6e1bd2bc2339cfede967466325ab93fdb50203b019d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a67c029eb5824b7dd6ae5998ddf5487606ddc2a5e0bee95f9524b4e65512bb92
MD5 b217b144a3e265e09eb66e65a23542d3
BLAKE2b-256 12228f4c9568b2fe35d810291e1ae549f12580ed262cbb980552f17350c084c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcabac33bed636c481fc7393941be02cd085e90ac5180e24a25f17384faab326
MD5 1d41b77341b3622520c1e7052308465d
BLAKE2b-256 f1a903366b9b771b4aeb1e2b1c7d6521f0bd0c6930feb0d2dbfa089319655dd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d1fa5514045b9d865bc6825d4520e261c14d775833f7281d96e34de3965a7ff
MD5 f2381e1b3f000c4227435d41cf5385f3
BLAKE2b-256 cbc1ef84f1b7cb418c4d5798bc1601a6c618e150ff28b31b458e0da6fd929813

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9e07893cec466d56b0f09b897580fd23c7ef78bee17e15f82bfc6cee966eff3f
MD5 73cfb274836c429208e6e113b8f0acd0
BLAKE2b-256 58c787c15a77f2bc1acb13b7b55a95c5314342d845dd91ec60cef4a1dc43c103

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8c94de80889df7c26b36197700d502bb128529e31b4542177071d218a630242e
MD5 dd59c877cb0f4d48b20c3fa277f1e442
BLAKE2b-256 de3a76b4f5e5d53685ae5a6b234cd35f6de346e4ea1173c4fa5fc4ff4359a57b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 62063cdb2a5710abb13383452a2ffcc84e54219a77840c713e2bb797b63945fd
MD5 08033f8f228f65c7387b01a71c62631a
BLAKE2b-256 0a7d81c47ae820c5baa31b827d0c1daefb31a5bf74487a9ec5ba2caa754a3ee0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a667b858ff98064cc7307df2691ada3bdb4ab08851bdda8261173845750ddfce
MD5 f1958c8c3ae8ed958f5302295a2f8b50
BLAKE2b-256 63ca8e1f1b39de122ade7715793e3c12495fc8839b57e820b0cc8bac7e04ff70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 672ef888d131d062a9673adf7269bc2c5a410dffb73c7e505b471c4aafdbe20f
MD5 be6b5be9b5c027757cd21e09db7ce65e
BLAKE2b-256 b00fc70158fe77dbecc621e259c02937672356a316d31313068302b0bfe29145

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