Pa logo v0.1.1 · MIT
libpa ecosystem · Zero-compiler PyPI wheels · Python 3.10–3.14+

libpa —
Prebuilt native libraries, pip install ready.

High-performance scientific and algorithmic packages written in pure Pa and compiled via LLVM -O2. Zero C compiler, zero LLVM, and zero runtime bloat on your machine—just pip install and import, or link the pure .pa core statically.

Batch Speed
530×
vs Python
Wheel ABI
abi3
3.10–3.14+
Pure Pa RSS
1.7 MB
0 libpython

01 / Package Catalog & Install Builder

Pick what you need. Copy one command.

$ pip install levenshtein-pa
1 selected
Prebuilt wheels: Linux (manylinux_2_28) · macOS · Windows No pa-compiler or C toolchain required
utm-pa Planned

WGS84 Transverse Mercator lat/lon ↔ UTM coordinate projection with zero-copy batch arrays.

kdtree-pa Planned

Flat-array 2D/3D spatial KD-Tree for nearest-neighbor and radius search with zero pointer chasing.

bm25-pa Planned

Okapi BM25 lexical scoring over flat CSR token corpora with pre-allocated top-K buffers.

02 / Three Usage Modes

One package. Three ways to consume it.

Every *-pa release bundles a prebuilt native wheel, pure .pa source modules via pa_lang.libs, and a customizable loop-template/ for fusing your own hot loops.

MODE 01 · PYTHON WHEELS 0 compiler

Zero-compile pip install

Install pre-compiled cp310 & cp311-abi3 wheels directly from PyPI. Works out of the box on Python 3.10–3.14+ with zero ctypes boilerplate.

install & import
$ pip install levenshtein-pa

import levenshtein_pa

d = levenshtein_pa.levenshtein("kitten", "sitting")
h = levenshtein_pa.fnv1a_64("foobar")
1:1 naming: levenshtein-pa → import levenshtein_pa
MODE 02 · PURE PA STATIC 1.7 MB RSS

Zero-overhead .pa import

Each package registers its pure pa/ kernels via pa_lang.libs. Import directly in standalone .pa programs with zero Python runtime linked.

main.pa
from levenshtein import levenshtein_str

def main() -> int:
    print(levenshtein_str("kitten", "sitting"))
    return 0

$ pac run --mode prod main.pa
Auto-discovered via pip install or -I pa/
MODE 03 · CUSTOM BUILD 530× faster

Fuse hot loops via loop-template/

Eliminate Python for-loop boundary overhead. Edit only the marked inner loop in custom_batch.pa (zero-copy In/Out pre-wired) and compile a custom .so/.pyd.

compile & import custom_batch
$ pac build --shared --mode prod \
    -I ../pa custom_batch.pa -o custom_batch.so

import custom_batch
hits = custom_batch.filter_batch(
    q, corpus, offsets, 4, out_idx, out_dist
)
1 FFI call instead of 10,000 Python iterations

Build your own *-pa package

Use the bundled libpa-pkg AI skill to scaffold pure kernels, differential tests, loop-template/, and cp311-abi3 wheels in minutes.