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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cognite_kuiper-0.17.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c63e57c5541f31a1df2fce93ab2dd47e712a46d9ba52c7473b8ae1f3362d8655
|
|
| MD5 |
232e047d7d5763f246c828c6e109d67c
|
|
| BLAKE2b-256 |
4a3f4afee86194f133ee021d3916761b5d0d04153349aaf9b8ff83a6f61b30c3
|
File details
Details for the file cognite_kuiper-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6249b4ae281b23bc54f254c4d2983ca8b80f5995d34df37f695e670f443eabba
|
|
| MD5 |
ed07a7d5cf65e6f201ee9d72b20fe4a2
|
|
| BLAKE2b-256 |
cf26dac62c124ae2fdbe143001d077d463cec6caff8c89711efd928165d1ef9e
|
File details
Details for the file cognite_kuiper-0.17.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
486c102e0c506517846fb8287792db5cf26a559738bbf3a9df17680d4e644205
|
|
| MD5 |
896e5ec67796b25ab1edbfa0ecbb6979
|
|
| BLAKE2b-256 |
b369f81ecb119027ba3cb149d08117ad3c2979299b6944da7a1800cb3976b908
|
File details
Details for the file cognite_kuiper-0.17.0-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6a3e994da3e2151155d8a9cfa8e42a1bf2deafc4879459213fc5051e6499353
|
|
| MD5 |
ac7d0591794e571c6e82fb775d187d57
|
|
| BLAKE2b-256 |
347a37c092fb37c893a5b3b6eb33a1b83026bbc252b147eb6ff0dd43dd9c9f59
|
File details
Details for the file cognite_kuiper-0.17.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
003bdcc8f5a7a2883518634794a486ff614b89ed9088997fafbe5f9cc22f6b2d
|
|
| MD5 |
1abe9d34bce9ca727f1d25a9be787318
|
|
| BLAKE2b-256 |
a14831f32ddd340257242b3e08f6c773f2c9ab30cf630b865cf9ca0fb90ea321
|
File details
Details for the file cognite_kuiper-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
865a01cfe86688750ec6ceeda4f170289c9c6eb816999a62377b4c0ea70160a2
|
|
| MD5 |
0f765594d3ecf613865fdad5442d85c5
|
|
| BLAKE2b-256 |
628208d19adb15ba545ca2f02f2810fe7dea21722d2fcfdc89f5d1957a909106
|
File details
Details for the file cognite_kuiper-0.17.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2e2801f9952d50be3a8f4b5a47d03eb3511ae6ac546a7518e911f12d47e2848
|
|
| MD5 |
73a717e8cce715a32cbecb3e8e3eb80b
|
|
| BLAKE2b-256 |
e86145b29d3e664c46471b64f317b55a0125bf10a17347a1525002d0126c4d91
|
File details
Details for the file cognite_kuiper-0.17.0-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a0d9f8b1ec26e4dbc716f7b8ad1999f8a80c75b7bf3f439735520ed55fc5079
|
|
| MD5 |
4bc03a0741bd6ab046c4f08ebf0c93d3
|
|
| BLAKE2b-256 |
4872514ec2df35165d9fd0b31b1efbf94db286fa4c84f1ffaeca3bed3a6bb8b2
|
File details
Details for the file cognite_kuiper-0.17.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b5f36722c08de31afe9aca65815507b2a9fc25f39ecd65a1f1c3ed365496442
|
|
| MD5 |
369bff196fbffbad4d384121101befe4
|
|
| BLAKE2b-256 |
b30d5db36617a79fac684d4ca6ebbb4a812c1f914d55b497387fbd798d117320
|
File details
Details for the file cognite_kuiper-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d1b9251db6335d53cf917f208020516ece57255f78c528b32cd4568be7b8fb7
|
|
| MD5 |
d5fee24ad1ba55b9b3098ef88c7faa1d
|
|
| BLAKE2b-256 |
513bfe569e85108cc6880c44ee2ac832bf881b991ecf07b1a817b0db8a4115d0
|
File details
Details for the file cognite_kuiper-0.17.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4a266a25a363a78f5f2269e71b943d78a00c14ba9398a637dae6e56e2b37984
|
|
| MD5 |
423fd3c22d42bc5265d487040cbb675e
|
|
| BLAKE2b-256 |
ab41c3a78585af582bb7fcc4cd9d411ef6b85910209fb81c563fbbc70dd1aad3
|
File details
Details for the file cognite_kuiper-0.17.0-cp310-cp310-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cognite_kuiper-0.17.0-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a379dfdaa7dd8cf590f21781b7ee2d493ca8284c69e7f0770377f6d6508a84fb
|
|
| MD5 |
5cb3a7c66a11a86635d2d4a77d23dbe5
|
|
| BLAKE2b-256 |
0fae3f680bd6225971305fb785a9ab15e797c5082c42cd9406d3d4a6bbe84f13
|