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

Uploaded CPython 3.12Windows x86-64

cognite_kuiper-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cognite_kuiper-0.13.0-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cognite_kuiper-0.13.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.13.0-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

cognite_kuiper-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cognite_kuiper-0.13.0-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cognite_kuiper-0.13.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.13.0-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

cognite_kuiper-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cognite_kuiper-0.13.0-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cognite_kuiper-0.13.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.13.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 de5545850817fd6454bce4bf0cb47ea65d1561e16c674357e26f40c5e62dba9a
MD5 8482819aca2070aa61660af19a9ddc49
BLAKE2b-256 22d79fbb72c71fda500577092b65b72737b26797c100e935237c333c41c6c2c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fea28435c03f179983523401a8b0303c4b336f2876b9feae37a5598ac8577613
MD5 ee7bca55f7f0ce68cc1ab016ffd7a615
BLAKE2b-256 be490726f8935327d3d62e4e95f48a055da17d8daf87c2fe3f7f19e7a79d93a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 637029931b1c0529aa0b87f3a2d66070a582c681525b238644cc9dbc9eb18e6d
MD5 baa496ad6ef3f36983b1f61d25331106
BLAKE2b-256 7adb69e5d1196c83d1b85ebeca75129d1c98c801c7cb20968ded71d068b1eca7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 20afbd4024c3ed7327155276041d20205512d6a2d18d135a7f4865a9d30fbfe5
MD5 c2f3338b3a003ed6e0e2af29b61e9a78
BLAKE2b-256 a0e6968aeaaf04e69d0950134bfb9a8065924dc199a642d8b830e1fd0415ae77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2709393cb8aabfc461444694598e62f9b120cfa3063b27cf2a4af43b93a5b1df
MD5 182e31c2d14cda2b53375a2eefcfada1
BLAKE2b-256 317037043368bee8fe27446ac79485a50a7b49a2285194547408bd1bf165964c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c67393e630e6736482c78d8bc91e022bda0e8416a28ae2dea511cb51d653dc0b
MD5 cf1765abac44dad29f2f4fe327d7f562
BLAKE2b-256 7669187b16e2fcb8d6351c2990e9edb0efffa6795775679c7274405ae9a1bf12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3d08e3453883d3f44092a64739a799fe3b4a407224bb335730b0ff060658069
MD5 20e40e8886edb970d988a5452c27f106
BLAKE2b-256 deb2ae6f485d529688f8c0657e8c2135149c2e70adcbdceebc2a7a3e31de7c84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 48d3e76fb08ff09ffc099d11bcadf8119cfd6ca92ae2c6068ba322d9e45e8790
MD5 450d1a4f2b5a8893afb2be8d73206efa
BLAKE2b-256 24507e3c7a1f8c350f4bca1269b950dc10aacec4cb98641a2b9a278162629d19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b50ea8d464c4f749d1924540571f496ceff1085084fa2a428b96300211f51b0c
MD5 ee0d847143032c2c8b4a7b4ca2421651
BLAKE2b-256 38e44f6596f3b60dd702c28dcbe5be5da90cbdd77eff9b419cc3a911e1fe0dcc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d340934741c4ae32768d3bc3548c80a774399f30874e6dbdb8c71ff54fe6456a
MD5 7c028f4fdfec5fd388d17c997d299357
BLAKE2b-256 c6ce033f8b54449b198fbff246ce33bb96ea3f320d3fb888f6dd4c5f066a3b7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dee6b55509d6eb40c53a0f7fec7d54a6f1fd40665ebc31893dfb46ea85cb41bd
MD5 223ae7578c56cc45bcaa57c6164336e0
BLAKE2b-256 0a9ae6b603eba07d0c1816943328726e9b075467d4a0bce49c7120211f6e580b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_kuiper-0.13.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6e9f29a392042949a48268f2201c812d53de64179c92f8dc521ff730693f1cea
MD5 1f799c0aad75390e66358b00f8f0e3e4
BLAKE2b-256 92bbf49148556c0056e9d0e6abd94103ad057d2ada6454e6fe3ff2de30da028f

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