pl-row-encode
A Polars plugin for row-level, type-preserving encode/decode.
encode(*cols) packs a set of columns into a single Binary column where each value is an
opaque, self-describing token: the polars-row encoding of
the row, prefixed with an embedded schema header. decode_series(...) reverses it back into a
Struct, recovering the original dtypes without needing any external schema.
DataFrame
-> encode(*cols)
-> opaque bytes
-> decode(...) # (row bytes -> Struct -> original typed columns)
-> DataFrame
The type information rides with the token and can be decoded on the spot at some later date.
Token layout
Each Binary value is:
[ u32 header_len (LE) ][ header bytes ][ row bytes ]
header is a bincode-serialized Vec<Field> (logical schema); row bytes is the
unordered polars-row encoding of that single row. Embedding the header per value makes
every token independently decodable.
Usage
import polars as pl
from pl_row_encode import encode, decode_series
df = pl.DataFrame({"id": [1, 2], "name": ["alice", "bob"]})
tokens = df.select(tok=encode("id", "name"))["tok"] # dtype: Binary
# ... hand `tokens` to a vendor, get them back ...
decoded = decode_series(tokens).struct.unnest() # back to id / name with dtypes
For the lazy engine, the output Struct dtype must be known up front, so pass a token's
header explicitly:
from pl_row_encode import decode
header = ... # the [u32 len][header] prefix of any token
lf.select(decode("tok", schema_header=header)).collect()
Development
make develop # build the Rust extension into the venv (uv run maturin develop)
make test # build + run pytest
make lint # ruff + ty
The first make develop compiles the full Polars Rust workspace and takes a few minutes;
subsequent builds are incremental and fast.
Notes / limitations
- Built on
polars-row, the same machinery Polars uses internally for sort/group-by row encoding — lossless for primitive, string, boolean, temporal, and nested types. decode_seriesinfers the schema from the first non-null token, so an all-null/empty Series needs the explicitdecode(schema_header=...)form.
Metadata
Release files for pl-row-encode 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pl_row_encode-0.3.1.tar.gz | 44.2 kB | With provenance | Details |
Built distributions (wheels)
Total release size: 61.8 MB
Release files / pl_row_encode-0.3.1.tar.gz
| Download URL | pl_row_encode-0.3.1.tar.gz |
|---|---|
| Size | 44.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bbe883ebb4d0abdf6d12014d95774da2e05238905ff14177b1421b09b9c1492
|
|
BLAKE2b-256 checksum How to use checksums |
5abb11296554fdbd48a5a859ca373a0ed4e6c82baea0324957b1eaa48d654308
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pl_row_encode-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f311fefbef6260391ae09c8af05a84b40d13730e35df2cad7162df410f5b6b0b
|
|
BLAKE2b-256 checksum How to use checksums |
9c7ad37dcdf60c3b37340c90beb09c038555088cc1facea2559b3fc21adbe501
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pl_row_encode-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
4c5b7cc05410a6d9c07f448ad60c63e8caabfbc56cf2713c0a812ea396578f17
|
|
BLAKE2b-256 checksum How to use checksums |
562880aae20aeac46a0697d5e8caf9df1c78438e26d7ef87bc9820f29cd9e024
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl
| Download URL | pl_row_encode-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dcfb97d469c90da2fe7a2b4c7a12ba95c9a9de9ec905031051c4bcb4844bb5ba
|
|
BLAKE2b-256 checksum How to use checksums |
bbcc2e52d213be11d8c0e760b30269419c9b8ca37945ca6f90e08bb6f7504e55
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp313-cp313t-macosx_10_12_x86_64.whl
| Download URL | pl_row_encode-0.3.1-cp313-cp313t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
db38fb37c32c58d34a140a1d30e8d8bf1266c2bb21a99bbb8ab7951b4bec147a
|
|
BLAKE2b-256 checksum How to use checksums |
1a0396de8ed0c5a645d51e67aa6f5f0e1e2aee1887b4e34312743b1f0fe20c6f
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp39-abi3-win_amd64.whl
| Download URL | pl_row_encode-0.3.1-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 6.9 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0f81681eded79243ae92e236a8d23cbef5f323e8dc899c0a94725c7dba45398f
|
|
BLAKE2b-256 checksum How to use checksums |
08781e01b95c7a85a44773ecee583ef41f6a65ef1211889107c86d1b4df07d60
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | pl_row_encode-0.3.1-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9329132f15655be3c2bab388356aa5ca0715e64516a25648ebdeb5dacd226b63
|
|
BLAKE2b-256 checksum How to use checksums |
7456ffea5e2f4a9d484245d181363ff71a8771a6ef7759329a43a19bb5f37342
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pl_row_encode-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
92dfc9f68dfa618e2e568b8d234b08c9e7b6964d0b74f170618d5a780d388301
|
|
BLAKE2b-256 checksum How to use checksums |
18ee17924a0215cab1a489693b4cb72226cce0ac2fb15ac2545aa756113bf7d9
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pl_row_encode-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
91806d3faa82f93a843ca26d9ece68a593b69cd583466b34f4296a5a58f810fb
|
|
BLAKE2b-256 checksum How to use checksums |
16099c8b003fcab92e30030b17f162095e34a031ca62ca1bb1691aed311758d7
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pl_row_encode-0.3.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
adfbf5c85cdf569608f6946668033ddb0f55ea237c1a9dcac30e19a622b65c03
|
|
BLAKE2b-256 checksum How to use checksums |
fa130e0a7bdcf507497c0d0f167f7e8d8cdd835cdac4d90b99ca56635e7d0356
|
| 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 Jun 9, 2026.
Transparency logRelease files / pl_row_encode-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pl_row_encode-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4dff93dac209a73eacc191e801d45002c99abffde3eca977e48b609a726dd09f
|
|
BLAKE2b-256 checksum How to use checksums |
0296b512af5af9d44f246739ab24b1ba42a5f4a653309a33c8b553377e59d46a
|
| 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 Jun 9, 2026.
Transparency logSecurity for pl-row-encode 0.3.1
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.
Full provenance
All 11 files in this release have been uploaded with provenance metadata.
Attestation for pl_row_encode-0.3.1.tar.gz
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 Jun 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.