Python interface for Kalix: hydrological modelling and Pixie (Gorilla-compressed) timeseries I/O
Project description
kalix (Python)
Python interface for Kalix.
Current functionality:
- run simulations from INI model files (in-process, no separate CLI binary)
- read and write Pixie files (
.pxt,.pxb)
Planned:
- programmatic model manipulation and building (
Modelclass) - optimisation
Install
pip install kalix
Usage
Run a simulation
import kalix
kalix.simulate("model.ini", output_file="results.pxb")
df = kalix.read_pixie("results.pxb")
print(df.head())
The Python equivalent of kalix sim model.ini -o results.pxb, but in-process —
no separate CLI binary required. Output format is inferred from the extension
(.pxb for the Pixie pair, .csv for CSV).
Both outputs are keyword-only, and at least one is required:
# Outputs + mass-balance report
kalix.simulate("model.ini", output_file="results.pxb", mass_balance="mb.txt")
# Mass-balance only
kalix.simulate("model.ini", mass_balance="mb.txt")
Read / write Pixie files
df = kalix.read_pixie("results.pxb")
print(df.head())
kalix.write_pixie("out.pxb", df)
The DataFrame index is a UTC DatetimeIndex; each column is one timeseries.
read_pixie accepts either extension (or no extension) and finds both files:
kalix.read_pixie("results.pxb") # same as
kalix.read_pixie("results.pxt") # same as
kalix.read_pixie("results")
write_pixie prefers a tz-aware DatetimeIndex, but will try to coerce other
inputs (emitting a UserWarning when it does):
- a naive
DatetimeIndexis localised to UTC; - a default
RangeIndex(0, n, 1)triggers promotion of the zeroth column to the index (and drops it from the body); - any other non-
DatetimeIndexis passed throughpd.to_datetime(..., utc=True).
Integer and float dtypes are never auto-interpreted as datetimes (this would
silently misread values as epoch nanoseconds). Set a DatetimeIndex explicitly
in those cases.
Building from source
Requires Rust (1.70+) and maturin.
# Editable install for development
cd python
maturin develop --release
# Build a wheel
maturin build --release
Tests
maturin develop
pytest python/tests
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 Distribution
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 kalix-0.2.6.tar.gz.
File metadata
- Download URL: kalix-0.2.6.tar.gz
- Upload date:
- Size: 79.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78772425580d2366b87158a1437600c45186584e8f045f68ab07d57770309e74
|
|
| MD5 |
8280128706ca4eebfe0e745a4c3c4850
|
|
| BLAKE2b-256 |
ff69e7042ba20067b4f6c366b5d603efcdbe9d830d5cf538ef7b8eb2a42b3bb5
|
Provenance
The following attestation bundles were made for kalix-0.2.6.tar.gz:
Publisher:
release.yml on chasegan/Kalix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kalix-0.2.6.tar.gz -
Subject digest:
78772425580d2366b87158a1437600c45186584e8f045f68ab07d57770309e74 - Sigstore transparency entry: 1701444095
- Sigstore integration time:
-
Permalink:
chasegan/Kalix@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/chasegan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kalix-0.2.6-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: kalix-0.2.6-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 479.9 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26ba31494cf6a6ae4b59925da8458dd3c9db8532d9f310700d232a277f24d46b
|
|
| MD5 |
ba1f04f8d3449042fda8888f565d2013
|
|
| BLAKE2b-256 |
63813584c443fe63a8230315115fec008fd76db3b2c42e67b1fd608bd32b6c6c
|
Provenance
The following attestation bundles were made for kalix-0.2.6-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on chasegan/Kalix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kalix-0.2.6-cp39-abi3-win_amd64.whl -
Subject digest:
26ba31494cf6a6ae4b59925da8458dd3c9db8532d9f310700d232a277f24d46b - Sigstore transparency entry: 1701444123
- Sigstore integration time:
-
Permalink:
chasegan/Kalix@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/chasegan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kalix-0.2.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: kalix-0.2.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 592.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1068cd8ab12ccddeb6c87a8aded37684e8510a738656840e484c60a622d74ec3
|
|
| MD5 |
3ab4cbbe7bbd4d17a1add3cb3b8e0980
|
|
| BLAKE2b-256 |
4289d567fd33a93c48aadabcd59df49ffacf139fa67c498275e71fbb55e6644a
|
Provenance
The following attestation bundles were made for kalix-0.2.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on chasegan/Kalix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kalix-0.2.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
1068cd8ab12ccddeb6c87a8aded37684e8510a738656840e484c60a622d74ec3 - Sigstore transparency entry: 1701444105
- Sigstore integration time:
-
Permalink:
chasegan/Kalix@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/chasegan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kalix-0.2.6-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: kalix-0.2.6-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 511.8 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19113e1f9ec47fe42ccca09d2d2cffbe1d7d9767fd810cad1fc360a398b6dd88
|
|
| MD5 |
3382181cc7eede3b5139a21fa08e4f63
|
|
| BLAKE2b-256 |
d63e747a31f22874c843fbc2ed31ad8b2e46ad0bd5905701fdb2bb7b1f154370
|
Provenance
The following attestation bundles were made for kalix-0.2.6-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on chasegan/Kalix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kalix-0.2.6-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
19113e1f9ec47fe42ccca09d2d2cffbe1d7d9767fd810cad1fc360a398b6dd88 - Sigstore transparency entry: 1701444136
- Sigstore integration time:
-
Permalink:
chasegan/Kalix@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/chasegan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0026c26bedc446ade18d27aa53cbc9e10ad2c8d3 -
Trigger Event:
push
-
Statement type: