This package is a faithful port of scolta-php (../scolta-php). The PHP source
is the reference for behaviour — read it before porting each piece.
- Parity over idiom. Match observable behaviour of the PHP code. Where the
Pagefind on-disk format is involved (CBOR, delta encoding, format writers,
tokenizer boundaries, hashing), reproduce it exactly — the shared WASM rejects
a non-conforming index. Internal-only formats (token cache, build chunks) use
Python-native serialization (msgpack/JSON), not PHP
serialize()parity. - The pure-Python indexer is the default (
indexer: auto). The Pagefind binary path is opt-in (indexer: binary) and falls back to Python when the binary is unavailable, mirroringIndexerResolverexactly. - Reuse the WASM/JS/CSS assets verbatim from
../scolta-php/assets/via a fail-closed extension allowlist. Never ship.sha256,.d.ts,.map. - No AI attribution anywhere (commits, comments, docstrings, docs).
- Tests are ported 1:1 from
../scolta-php/tests/(PHPUnit → pytest), preserving each test's regression intent. The shared-JS Jest suite (tests/js/) lives here too and runs in CI; the Amazee subsystem is implemented (src/scolta/ai/amazee/).
- PHP camelCase properties/methods → Python snake_case. The PHP
fromArrayalready accepted snake_case config keys, so the config wire contract is unchanged;from_dictis the Python entry point.
src/scolta/— the binding (config, content, ai/, index/, html, export, …).src/scolta/index/— the full Pagefind in-process indexer subsystem.tests/— pytest mirror of../scolta-php/tests/.
uvfor env/deps,pytestfor tests,rufffor lint.- Python floor 3.10.
PyICUis an optional[icu]extra (mirrors PHP'sext-intlbeing a Composer "suggest").