pixie-py
pixie-py provides Python bindings for Pixie, a C++20 succinct data structures library. It supports compact ordered trees (BP, DFUDS, LOUDS, and ForestCover) with cached traversal, binary persistence compatible with pixie-cli, and static range-minimum queries (RMQ).
Install
Requires Python 3.10 or later:
python -m pip install pixie-py
Linux x86-64 wheels dispatch once on import to AVX-512, x86-64-v3, AVX2, or SSE2 according to the CPU features available to the process. For Graphviz rendering in notebooks or scripts, install the optional extra and system Graphviz:
python -m pip install "pixie-py[visualization]"
Quickstart
Build a succinct tree from a JSON-compatible dictionary (children, parents, or edges), save it in the CLI-compatible binary format, reload it with its source-ID permutation, and query a path:
from pixie import Permutation, Tree
tree, mapping = Tree.from_json({"parents": [3, 3, 0]}, to="fc")
tree.save("nodes.px")
mapping.save("nodes.perm.px")
loaded = Tree.load("nodes.px", permutation=Permutation.load("nodes.perm.px"))
print(loaded.to_text())
print(loaded.path(2, 1))
Output:
3
┌┴─┐
0 1
│
2
[2, 0, 3, 1]
Binary .px and .perm.px files are interchangeable with pixie tree in pixie-cli. Both Tree.load and Permutation.load accept load_mode="mmap" (default) or "ram".
For repeated navigation over large trees, create a traversal context (loaded.traversal_context(cache_bytes=64 * 1024)) and optionally share a prebuilt loaded.root_navigation_index(budget_bytes=32768) across contexts.
Guides and examples
- Working with trees: Jupyter manual covering construction, navigation, encoding conversion, visualization, traversal contexts, and compact binary archives.
- Traversal contexts: cached traversal and shared root navigation indexes.
- RMQ: static range-minimum queries and CLI-compatible
.pxpersistence. - Encodings and LOUDS navigation: incremental construction with
TreeBuilder, string encodings (from_bp,from_dfuds,from_louds,to_bp,to_dfuds,to_louds), and BFS navigation.
Public classes and methods ship with NumPy-style docstrings. Use help(Tree), help(TreeBuilder), help(Permutation), or help(RMQ) for full signatures, parameters, and ownership notes.
Development
Building from source requires Python development headers, a C++20 compiler, and Git. By default, the build fetches the Pixie core tag matching the package version.
To develop against a local Pixie checkout, set PIXIE_SOURCE_DIR in your shell and install with test dependencies:
export PIXIE_SOURCE_DIR=/path/to/pixie
python -m pip install ".[test]"
python -m pytest
After editing C++ bindings or headers, rebuild and run tests:
python -m pip install --force-reinstall --no-deps ".[test]"
python -m pytest
python examples/louds.py
Run unset PIXIE_SOURCE_DIR and rebuild to return to the pinned GitHub release.
License
Apache-2.0, matching Pixie core.
Metadata
Release files for pixie-py 1.2.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 | Actions |
|---|---|---|---|---|
| pixie_py-1.2.1.tar.gz | 53.0 kB | With provenance | Details for pixie_py-1.2.1.tar.gz |
Built distributions (wheels)
Total release size: 7.8 MB
Release files / pixie_py-1.2.1.tar.gz
| Download URL | pixie_py-1.2.1.tar.gz |
|---|---|
| Size | 53.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17fbab2a5a2a3c44da7376c887f2448d5ddf39a257cd94ea910e6f32ac9d1800
|
|
BLAKE2b-256 checksum How to use checksums |
0413ca4a55275264fe2097bcda3fb8b4681383a86e3c006579b2ad527f12ed9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logRelease files / pixie_py-1.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pixie_py-1.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
847b922007e8743273ea73971c9451c99a6e796f38b0691dc845294690152c41
|
|
BLAKE2b-256 checksum How to use checksums |
0b280c6215bd7ae6fc978391523ddac86c4475a6f5a856267a55bc66b508e26c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logRelease files / pixie_py-1.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pixie_py-1.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4c14bc3c6e4a59fa47e177fe9adfd627d5e8b6b539af86b35414906caeb73b34
|
|
BLAKE2b-256 checksum How to use checksums |
5d1239de5f7f9a4d835c8a171b9f837e9c55a31688210e0e4a95776412acfe04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logRelease files / pixie_py-1.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pixie_py-1.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2810ee72e93f1fdd3826db21a2fcabadaf22c66709e7c34896a21e9bf25e8502
|
|
BLAKE2b-256 checksum How to use checksums |
b53584a78aaa08716512a95c918e91d0f3dd7f05889059772c72d83ee6d38dfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logRelease files / pixie_py-1.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pixie_py-1.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4a72c38452f15e973ee4ae43a4e52b27ac884dc6a5d910c2d22ea960ee603419
|
|
BLAKE2b-256 checksum How to use checksums |
0a6a8047d184d555539eb064ac85ae55259d4d0be42865165f1ca298566a5577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logRelease files / pixie_py-1.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pixie_py-1.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d0dd3e6d88f79363a37ff39f42ab960160c9fba3b56299c389ccf8505e891fd
|
|
BLAKE2b-256 checksum How to use checksums |
08681c71ce4fe8e6888eadfea9e7940e2bcceb54d2da3707131d3d0cf87dd776
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logSecurity for pixie-py 1.2.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 6 files in this release have been uploaded with provenance metadata.
Attestation for pixie_py-1.2.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 Dec 1, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.