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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file cognite_kuiper-0.12.0-cp312-none-win_amd64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp312-none-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274c3cff1d148cb661f3434e572b90bd011daaa4a2c678450294af6df750a0fb |
|
MD5 | 38a7881454c4403270d71ca6ca4f0971 |
|
BLAKE2b-256 | 8a2ad7fb3b1273cb4ede426dc76b66b5b722dae55f54e9b3d0ee6cf68b60be17 |
File details
Details for the file cognite_kuiper-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a42224a233ef3961008d18184149d16c419f14d617ae71117f5fcff96e1c6611 |
|
MD5 | d6774eb53ea7e1e62374210b83ec6ec1 |
|
BLAKE2b-256 | a3c39388e3408cfe9d63f6c7284fc325e3fad35c73c92c6d58fab44a895b66ca |
File details
Details for the file cognite_kuiper-0.12.0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e25ad0208401f141a442ba6af21782ce9116e02f4d968914169fd641f802e79 |
|
MD5 | 4be2eb8c3a11405487a622e32e6d8ca7 |
|
BLAKE2b-256 | 9645743fa80f9bf2a4bddb2da93125c7e621245646c73e2ee162d76712d6da5b |
File details
Details for the file cognite_kuiper-0.12.0-cp312-cp312-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c4a12cf9c82811199b6e02736d2e48d680c44f768e5a406e954db935165c0d6 |
|
MD5 | 3beba81f862dc8b4328ed32538bb671e |
|
BLAKE2b-256 | 095672d88a68bde3ee33c4b3187badb36e049579f1ac88acde819dbda88011c4 |
File details
Details for the file cognite_kuiper-0.12.0-cp311-none-win_amd64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp311-none-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68de662e21e553de1a77e061745b32f8f44bc3c22f7cb35063a93d108e4569bf |
|
MD5 | f6b56b4ec0832b6dd548eff250ab27b7 |
|
BLAKE2b-256 | 26084ea0b4ae139cc795a3a7e18720fb4adef015c194386a602deacd9788c53e |
File details
Details for the file cognite_kuiper-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b936642ac0a1dc75bc475b83c915727f6c97fdc40181e11a0f0c3c0054710cc7 |
|
MD5 | 359b8f87799849263c36431ec60a1557 |
|
BLAKE2b-256 | 6311c3f2ccef2838ad9992c46e7d10e3579ce85946080d3c0ac715e792b9e734 |
File details
Details for the file cognite_kuiper-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449b9aa61b98621677246725b840ae4d93a78cf6844fae712678c668f4661d61 |
|
MD5 | f67affedfae0bcec87afe9ce51d2ada1 |
|
BLAKE2b-256 | a9424a895a9595c03b4d23c235c51fca865c66bb01fe1a572538eca639b97407 |
File details
Details for the file cognite_kuiper-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 395e6ee4440f05ee65cc749e808a3c10aa93621921b964cc7e6e3d22861c34ec |
|
MD5 | dc3179045dae5ed8f98e46e1dce9a48d |
|
BLAKE2b-256 | bea03401d45c9a91edd13b055d3809b48b54a909deda3a9f739f009d6d983301 |
File details
Details for the file cognite_kuiper-0.12.0-cp310-none-win_amd64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp310-none-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cee764db9550d73bd3445441c4762ac1f9a97c4fe423bfe07bbd39f38683ce4d |
|
MD5 | 22572dbbb5899b1e07187f5e09d26974 |
|
BLAKE2b-256 | bde9feb43a7750b9703faf2387f0f13cae46fb4a062fcf9bf5a2e17a67e08d36 |
File details
Details for the file cognite_kuiper-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd1d59217c4bbf18fb387e5fdbc267093a883c14b90c18e015bbb8e155b30430 |
|
MD5 | b26bb8265692e2cb0756901d54894b8b |
|
BLAKE2b-256 | 0b988e6ed047acda7d99b72db9f8a8e0b87f127d651c21570c8b55f9f3fc8982 |
File details
Details for the file cognite_kuiper-0.12.0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cca491a2dfe3aa0a1cd2eae03ecb34015e781a2434460463edf94dbc0fd8bad8 |
|
MD5 | 9a7f8f9a3d6eaf42f3b4b539bfe17ba8 |
|
BLAKE2b-256 | 745b8a225aedae2504bb5ab4e27378d542e5989215947881f47b054cd47492e4 |
File details
Details for the file cognite_kuiper-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: cognite_kuiper-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dda8df7ec408e2b29e9c1e0e127c28f0b99a3f2077cc13c27e8676db66a0194 |
|
MD5 | c0fc39ea65615602c2b75c426bb4525b |
|
BLAKE2b-256 | bf52fa202ebc206ff048e089e939750eb7e401a66cb1a5ac066435ecf6c168e4 |