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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

cognite_kuiper-0.15.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.15.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 421619890e1058e4ac8c194929132f975ea635504bf83784d6a399d4b8415a5c
MD5 397f6a42af6c02f088c40f3704799164
BLAKE2b-256 9f28762470ea189252d97f3f70722a30f1979c2004a6e4586c638ca9cce74014

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e2a88f3bd89ea55b714d2ba25045c68f7375b32c9386ed25d80ca65df4f8452
MD5 435f5d9d371c22e4fd2a6386c41503b0
BLAKE2b-256 dabb670f8129f9dc77da583cc6e6c1442bd2194f614202a8f9cc429511371886

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d52a3629dcd88ba18cc4b4aac4d7ce520faac01a5ec957d0ebee4cea641a4550
MD5 94a2fb47e3ba7e13e61cc7b13e32077f
BLAKE2b-256 238c3b8721b11d9c1c2bd4d45be40a4e16349971db41a7f3c01ed31d5d8edd74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 27797a85807c0e66439996597befeaf6ca99146039893fedba11705cb7ea5b39
MD5 03e2cece4840e55f83a3f25711f7866e
BLAKE2b-256 bbb6557cfc43942cc62ea0ffb1c4ec8d304910f25aff8985b4b149d057149da7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 add7fa7466c2d69476e3395b648a4352c93c717fa88596e932c1f2b7e296c80e
MD5 329122671cffe041f87251e1de609ad5
BLAKE2b-256 07e9d99775bc31f0e7d152f812e3d51dbdd93237ccade3a434a6840375c49cba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dddd00de23aa966d974df449a11a3ed0fff35a15150fa38c97fe01f2b694c84b
MD5 a6143e5f4bfe7a26e24fd81ec7ff75e0
BLAKE2b-256 93175ad5f4c631bebee1f70b0541c1ae97564dbd7fa7a2a4c84c3b56ed8bad46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b85b9236f05c6ecded51fb03c811f327c60d377c7564bcd56cad0131e99d1569
MD5 1d62767917de925d35b500c61eae531d
BLAKE2b-256 0293fdf8827d632a97aa0de828dc21ed4df357a1af815b9f7f9b52c54537d745

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 761647702511bdd64377526d46a08de4078d8939fb94d2f47e302feb43e67ee1
MD5 8d3012078da1aa40753b7c368478f2ed
BLAKE2b-256 1df24b94ff3caa8429b181a644234e8a21d0367969304212bf7d925070d7a827

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c89405ae5f802cfe9989bf2125fc5b84f893b530622bb70d9ad9d003eb88fe04
MD5 0ca74790e417c0beed78f35134610d99
BLAKE2b-256 5d44b863fa3ddb41d05a3c3554f33c731d3a03747e8db49823c162e687af0f4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0232880a8303a3cfebe02eea168e0dc4011ba1f6676d4b5d9965fb9058936dd5
MD5 4174d77e78f9b7517a409c48b7a93be3
BLAKE2b-256 225e59f2ad07f77eac31d26dc83bffc4876d0d6038c1171387a5d2c86897663f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59abdd1c2cc3fe439a635c77ff72aa90a201b9fc8c266c74a89acc84a47a0224
MD5 00b1a6da8443896df1a54beb516871f4
BLAKE2b-256 9bcf6ab83c3d92cff95913452271702217cc0f0ca473048b88c8c827541367d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.15.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 85e0bf12df070d977ee63077c1555d33678f701548f38fd9308309c48bf3990a
MD5 223f6b6981fc60a6f1e3ecfa5074fbea
BLAKE2b-256 beed77304d749794333c4080cdc3f6ce34607fe7ef6766f30195ef9f9cb93c88

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