Python CLI to convert between Lastra and Parquet/CSV/Arrow. Mirror of QTSurfer/lastra-convert (Java).
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 lastra_convert-1.0.0.tar.gz.
File metadata
- Download URL: lastra_convert-1.0.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fb62ec0a62154b174ffa2dabd86c1a30f5583a80bb2c4b25c6c9e813a2588eb
|
|
| MD5 |
fba9624ab58a3fd14d52ddde4f8804f7
|
|
| BLAKE2b-256 |
23191397d834f6e5ac3139931bcaf839c90418e833d23cd4c94f0a28e5c1fd23
|
Provenance
The following attestation bundles were made for lastra_convert-1.0.0.tar.gz:
Publisher:
release.yml on QTSurfer/lastra-convert-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lastra_convert-1.0.0.tar.gz -
Subject digest:
5fb62ec0a62154b174ffa2dabd86c1a30f5583a80bb2c4b25c6c9e813a2588eb - Sigstore transparency entry: 1401509198
- Sigstore integration time:
-
Permalink:
QTSurfer/lastra-convert-py@e9b2aa980db11cc72258aaea0f89cdc449987135 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/QTSurfer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e9b2aa980db11cc72258aaea0f89cdc449987135 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lastra_convert-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lastra_convert-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49145411df6e87197cd0948ce41d79e8fa7c876eaa471a82cdcb011b93b29af4
|
|
| MD5 |
ac5143eacda61d1f95256750eaed570b
|
|
| BLAKE2b-256 |
3dc81dd8a6ee4c106a7aa91a51ed4054b76d177773db36de1b07d5238723c256
|
Provenance
The following attestation bundles were made for lastra_convert-1.0.0-py3-none-any.whl:
Publisher:
release.yml on QTSurfer/lastra-convert-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lastra_convert-1.0.0-py3-none-any.whl -
Subject digest:
49145411df6e87197cd0948ce41d79e8fa7c876eaa471a82cdcb011b93b29af4 - Sigstore transparency entry: 1401509298
- Sigstore integration time:
-
Permalink:
QTSurfer/lastra-convert-py@e9b2aa980db11cc72258aaea0f89cdc449987135 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/QTSurfer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e9b2aa980db11cc72258aaea0f89cdc449987135 -
Trigger Event:
push
-
Statement type: