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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

cognite_kuiper-0.16.0-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.16.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 71f7aff7380dad5721ca6cdac01e408e840ffdb3c03523a6925aed2759429e13
MD5 6bc0042aeb58fd31189ab81a677c76d4
BLAKE2b-256 e4b626911a282494b59fdfd219c1a6e2cbeaca3d1bcae40c0090e1ec12f98c8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 126cfdf7f5e6c1dea21e9372fc828b980cdfb0c355532cc3aceace090b3dc271
MD5 8c1c8b8d5263b20b1be8793404a9ec61
BLAKE2b-256 3456a3a9b1991128e7daee19371a4d54bfc948258a2d49e01097bffac9926676

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 afef76fdde23755f0f6d0f6e98445b6c679f3f8b568910c2eb715fcbe3f696b6
MD5 5402d4724ad557bcfcc279e062280256
BLAKE2b-256 5d97648560e031de8983bfeeb3c17f58ac42f4d666f86f96220e31b2a42abc4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b17a2d690d41dea9edeeb3c031b32783362cbd8a1119ef062f1fc14340b6fa57
MD5 f0dd4cf940919836a905bbc944495ebb
BLAKE2b-256 36b2eaccdef4595b46ff05605deffedfcde52b67ddb1be8e39c492197822acfc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 792de8e6c1e476ee8ebe18c4854e0b9ab94f5f0bd11819854a54c3edc04a5afd
MD5 3b5aee637040f5f34a7745a35eb05009
BLAKE2b-256 be93ea44f372ea5c86e6b9e61b857853dde70fb9cce26618857328d90dece86e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc3531728c993119d66336a1a72d803b6e97b46893273ae3d60ba3c61ad5d402
MD5 d2ffe5184093ae8b583d84a3b1863dd9
BLAKE2b-256 c29e6bd6053012d94fb82da23cf25208ffdb07d7cc5c3e7958a79d84c89d04e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d907d3b6a1541ff0ad2ebd6e24bac84b5900a44e707d1871e5a6d3edc390d48
MD5 ede9f837bfb9ed595bec2d79e734397c
BLAKE2b-256 f5aff4ea7d088d3462126b23d9377d63ec81c49b840daddf67c6083eb8d19b7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1c06ada6e775ed99167a19bef906e40f36a811e591230b21d192c55423cb8943
MD5 6140d2d0460dbe96fa50f1b71b22de84
BLAKE2b-256 13fb27a2f534140d0ea7ce3b01a9ee810327b9075b5b359d545bae4e851e404e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0d2d54a99535818163ccacecfb15ef1539cbdc5722f30cc167087595262e5c91
MD5 31a3d4eb83231d78919771694ddfa326
BLAKE2b-256 3828c5dd046ba5394acc1db7cb7b80f9db1eecb398b43145c39601fba58dd817

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ea6defff8c0b2b5f2d4eaf57540b54ab05b54b3281f820bb0f6cdcb93032c27
MD5 08ec2cf61eba063046cacc72c5689d29
BLAKE2b-256 1a6295960fc0c7e95ff43894e02320007672d63546911e1f3317faf14f208862

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7935e729ead82207afe5ec77eb87617827e7cef0c4112f63007d6123b5a8a4e4
MD5 c5dbeb302bffe5e4c1decfbf7eacbea5
BLAKE2b-256 280e4249cfc7352e162a7f76a97a64908cacec9a36b4e559d9e70a66b49432a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.16.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d35b5f3b6bfc347a28e62577150833f9e8de203f282f7c8ec2a71937524f61a3
MD5 a67ef33b9e036ab0908332c322c32dc3
BLAKE2b-256 bea592d91a39693d486a57c3c605fa3211dc388bb65f204af3de864d1062ad52

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