Skip to main content

AI-powered search with Pagefind — Python language binding

Project description

scolta-python

AI-powered search with Pagefind — the Python language binding of Scolta. A faithful port of scolta-php.

Scolta is a scoring/ranking/AI layer over Pagefind, a static client-side search engine. The browser-side scoring engine (scolta-core compiled to WebAssembly) re-ranks Pagefind results and drives an optional LLM tier (query expansion, summarization, follow-ups). This binding does the server-side work:

  • gets content out of the application,
  • builds and maintains a Pagefind-compatible index in-process (pure-Python indexer — no Pagefind binary required at runtime), with an input-side token cache so re-indexing after a content edit only re-tokenizes changed pages,
  • proxies AI calls (Anthropic native + any OpenAI-compatible endpoint),
  • serves the reused WASM/JS/CSS asset bundle and exposes config.

The pure-Python indexer is the default (indexer: auto). The Pagefind binary pipeline is ported too but is opt-in (indexer: binary), with the same auto-fallback-to-Python-when-the-binary-is-unavailable behaviour as the PHP binding.

Platform integration for Django/Wagtail lives in the companion scolta-django package.

Status

Complete port of scolta-php, released as 1.0.x. See CLAUDE.md for the porting conventions.

Requirements

  • Python 3.10+
  • Optional: PyICU (the [icu] extra) for higher-quality Unicode diacritic normalization in the tokenizer. Without it the tokenizer uses a strtr-style fallback, exactly as scolta-php does without ext-intl.

Development

uv venv --python 3.12
uv pip install -e ".[dev]"
uv run pytest
uv run ruff check

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scolta-1.0.1.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scolta-1.0.1-py3-none-any.whl (769.6 kB view details)

Uploaded Python 3

File details

Details for the file scolta-1.0.1.tar.gz.

File metadata

  • Download URL: scolta-1.0.1.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scolta-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8c7b2b86f4cd839fd631e58e4c7552eb69c4597a7e9ceb3dbe19df7ba5342a6c
MD5 ca93a8f098300d39ef19c3f6407d8f08
BLAKE2b-256 04b85fafd384071ae2cf5bacebcad5ac7914192385f9be06c0d5268309cff73a

See more details on using hashes here.

File details

Details for the file scolta-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: scolta-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 769.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scolta-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01ac56896fcd51cf33bab2fe50487dff0c77df8bb11868a7f111da1bb7b7cb71
MD5 762fcdd271094d84ad284bf76d786160
BLAKE2b-256 c07751d8eeed668f5af86419efd9ebe3de66fcc092e3cfe3a0a20e0fd844bf51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page