Python CLI to convert between Lastra and Parquet / CSV / Arrow.
Mirror of the Java lastra-convert tool.
Install
pip install lastra-convert
CLI
Six commands, one per direction. Each takes input output plus a small flag set; run any with -h for the full list.
# Parquet ↔ Lastra
parquet2lastra ticks.parquet ticks.lastra
parquet2lastra ticks.parquet ticks.lastra --columns "ts:long:delta_varint,close:double:pongo"
lastra2parquet ticks.lastra ticks.parquet --compression zstd
# CSV ↔ Lastra (delimiter auto-detected: comma / tab / semicolon / pipe)
csv2lastra ticks.csv ticks.lastra
lastra2csv ticks.lastra ticks.csv
# Arrow IPC ↔ Lastra
arrow2lastra ticks.arrow ticks.lastra
lastra2arrow ticks.lastra ticks.arrow
Type / codec auto-detection (override with --columns):
| Source type | Lastra DataType | Default codec |
|---|---|---|
| int8…int64 / uint* | LONG | DELTA_VARINT |
| float32 / float64 | DOUBLE | ALP |
| timestamp / date / bool | LONG | DELTA_VARINT |
| binary / string / other | BINARY | VARLEN_ZSTD |
CSV column types are inferred per-column from up to the first 256 cells:
integer if every non-empty cell parses as int; double if every non-empty
cell parses as float; binary otherwise.
Library API
from lastra_convert import (
parquet_to_lastra, lastra_to_parquet,
csv_to_lastra, lastra_to_csv,
arrow_to_lastra, lastra_to_arrow,
)
# Auto-detect every column's type + default codec.
parquet_to_lastra("ticks.parquet", "ticks.lastra")
# Per-column override.
parquet_to_lastra(
"ticks.parquet", "ticks.lastra",
columns="ts:long:delta_varint,close:double:pongo",
)
# Decode every series column back into a Parquet (ZSTD by default).
lastra_to_parquet("ticks.lastra", "ticks.parquet", compression="zstd")
Each function returns the row count written.
Reference implementation
This package mirrors QTSurfer/lastra-convert (Java, JVM CLI). Output is byte-equivalent for the same input + codec choices.
License
Copyright 2026 Wualabs LTD. Apache License 2.0 — see LICENSE.
Metadata
Release files for lastra-convert 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lastra_convert-1.0.0.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lastra_convert-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / lastra_convert-1.0.0.tar.gz
| Download URL | lastra_convert-1.0.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fb62ec0a62154b174ffa2dabd86c1a30f5583a80bb2c4b25c6c9e813a2588eb
|
|
BLAKE2b-256 checksum How to use checksums |
23191397d834f6e5ac3139931bcaf839c90418e833d23cd4c94f0a28e5c1fd23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logRelease files / lastra_convert-1.0.0-py3-none-any.whl
| Download URL | lastra_convert-1.0.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49145411df6e87197cd0948ce41d79e8fa7c876eaa471a82cdcb011b93b29af4
|
|
BLAKE2b-256 checksum How to use checksums |
3dc81dd8a6ee4c106a7aa91a51ed4054b76d177773db36de1b07d5238723c256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency log