Skip to main content

pixie-py

Python bindings for Pixie, for experimenting with succinct trees and range-minimum queries.

Install

Requires Python 3.10+ with development headers, a C++20 compiler, and Git. The build downloads the pinned Pixie revision from GitHub.

Install from this repository into your chosen Python environment:

python -m pip install .

You can also use this directory as a local dependency with your package manager.

Example

from pixie import BPTree

tree = BPTree("(()())")
print(tree)
print([node.id for node in tree.children(tree.root)])

louds = tree.to_louds()

Output:

(()())
[1, 2]

BPTree, DFUDSTree, and LoudsTree accept their native encoding or another tree. Use from_bp(text) to read balanced parentheses into any tree type. PointerTree supports construction with add_node(parent_id) before conversion to a succinct tree. Node IDs and child indices start at zero.

For visualization, install the visualization extra and Graphviz, then call tree.visualize(). For a text diagram, use print(tree.parentheses(verbose=True)).

See the examples for encodings, navigation, traversal contexts, and RMQ. RMQ supports the CLI's artifact format; source values must be kept separately. Use help(BPTree) or help(RMQ) for API details.

Development

To develop against a local Pixie checkout, set a shell override. No repository configuration needs to change:

export PIXIE_SOURCE_DIR=/path/to/pixie

Install the test dependencies with python -m pip install ".[test]". After changing bindings or C++ headers, rebuild and test:

python -m pip install --force-reinstall --no-deps ".[test]"
python -m pytest
python examples/louds.py

To return to the GitHub pin, run unset PIXIE_SOURCE_DIR and rebuild.

License

Apache-2.0, matching Pixie core.

Metadata

Release files for pixie-py 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixie-py 0.1.0
File Size Uploaded Provenance Actions
pixie_py-0.1.0.tar.gz 49.2 kB With provenance Details for pixie_py-0.1.0.tar.gz

Release files / pixie_py-0.1.0.tar.gz

Download URL pixie_py-0.1.0.tar.gz
Size 49.2 kB
Tags Source
SHA-256 checksum
How to use checksums
43487f2a77d9f7b50971d2a65bb7c28b0edaec730412976841dc50dd5ce54552
BLAKE2b-256 checksum
How to use checksums
a2a57836b3a1e55ab0c7271c9d1887649eb2f2b43cd8b4c56a70a61a496f0032
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 Nov 10, 2026.

Transparency log

Security for pixie-py 0.1.0

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

1 file in this release has been uploaded with provenance metadata.

Attestation for pixie_py-0.1.0.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 Nov 10, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page