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

Work-in-progress port of scolta-php. See CLAUDE.md for the porting conventions and the per-phase progress.

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.0.tar.gz (7.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.0-py3-none-any.whl (716.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scolta-1.0.0.tar.gz
  • Upload date:
  • Size: 7.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.0.tar.gz
Algorithm Hash digest
SHA256 4ed0df4d25f73998be33b4532f5019eb4ee6e935d22ae6a0619683fabb770c77
MD5 aa97161c6ff3200d5de5c2ca0659fec4
BLAKE2b-256 b9ba2c965cce306bed84561903c214eefa7d195a32f2ca4a5e56d8f9893a0526

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scolta-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 716.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbbf573190a9f59de7648bcd0f8393e686bac58c2a4c96bc7157225cbc9df76e
MD5 6d0e475cfbed40ce1b22021737a970d6
BLAKE2b-256 a4cc155bf43538f7c18660d17af1dff3ca31e3914fa0cf038bcd465ff79cfcc0

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