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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

cognite_kuiper-0.14.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a8d43334f2345967121564c46afb33c1a0705fdc189a542eee1ae65574edcaa8
MD5 28a8a70dc40c260be128ba216e71fffe
BLAKE2b-256 8c51ccbc524b2a25f2c306fc94fefc8be9af8de950c220bfc04e50df9e616d0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 88b8d6640265f07a4c436237551c7b43d8af15d37d826fc638e8e50a5d701feb
MD5 a1637abbc0ca8f38e998db1d1026e5c8
BLAKE2b-256 3acb81f244829a5e9b2597b7e85b7ad3d182cd8d519a2a9644cfaa31bb4c91cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f542fae4da457d591c2d526057742893b3ccbc0a78656096587f64c47c5a8e7
MD5 f0693ee5852bb5cdd9cab5164e633404
BLAKE2b-256 983cc6b28758144e165262ba71c611119dc2f0ce59c0ff452384c135f45469f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 29f05ad0004efd51d80fb0b66b3c6b759ccf0025eb5c1447e5d24b8bd5e704d0
MD5 410061ee658e8918952be28a56d5b011
BLAKE2b-256 e41b9e381d450e29e47ddaad5efe7d9aab89bffce243d8a347fe1033a313c4b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0cd313e999bf127be1cd14b2f6b903aee5c8db7c3f54f3b6e22983b896f5ecff
MD5 a59cb3411582303d8ddf94d0f55be7f8
BLAKE2b-256 8f3c55612c2f36bded5e79039e38d492fa493eb1ee901b454b55c2dcce0854f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3fe6828ae1769683410677717eeddeb57fc40a7f3e9afc4fdce6f813d671f9f
MD5 47dd3222291b6e13072c1a94fb11036e
BLAKE2b-256 3d1e076da21d2de579feef9fb1e64d3b926ced1a4c119624e2af690a665af604

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 005dac4c457fe1e3ce01fdafc37cd20b112d0024dc5d6f7435e33616019eb7e3
MD5 78a82446875747c6746044261d95d7b0
BLAKE2b-256 b48c1bf2efa4c43108224ba7b16dd9b21b6a6bc9969809822bf4acf8b89b6337

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 36553cde6cae6213331d526389f69c0203ff648e989a43eff710d415266afae1
MD5 888efbd839bbe114f40db1aeb2b601be
BLAKE2b-256 311621fdd2fb497ae2cee7ebbd3bc51d2bd32887750ee8d7da44b361ac87262b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1d2b3e8427c97fe4fafa4f2b29625df2e52ce411750c00e86cb69e4b2577333c
MD5 4b1e2de80c270cd476709f8805fd980c
BLAKE2b-256 a6c83f8cbaf2269c547641df9bcbdf613a1db817326d21e3ef92ec153d34b1ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed356db75d5eb83cebc4c1d520091cd4742c0b68c9c793114f1c44bca36fd3e0
MD5 75b9eb914514e021ecbe7dd653c61117
BLAKE2b-256 bfecfb7a963049a2df63919467c4daa3e4c4f6fc13b1f413ec57e5cf41f8bbd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0215b14f661ed93dd43693e2cb0b822eab1229c50f8c423d451dc8e29e2fa318
MD5 732a45f32b8bad55d23cc0e5481f7f8f
BLAKE2b-256 1edcca71913e9d20f1bae9c1f5848651635c90f423c61bbf901ccd802a5b98a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.14.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 226c436f3b40ad6942e4a4f10d444462cb7e6d89c262ea298bda63a122383551
MD5 d6710ae982be0073289b2aeaaf7f3a1f
BLAKE2b-256 5aef4d1dcc1418aed63ea4f7b88ead9240e197cc765460843d9c767743dd75fb

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