Skip to main content

Search as you type on your own dataset.

Project description

Documentation Status https://github.com/MacHu-GWU/sayt2-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/sayt2-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/sayt2.svg https://img.shields.io/pypi/l/sayt2.svg https://img.shields.io/pypi/pyversions/sayt2.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to sayt2 (Search As You Type) Documentation

https://sayt2.readthedocs.io/en/latest/_static/sayt2-logo.png

sayt2 is a Python library that provides a Google-like search-as-you-type experience on your own dataset. It lets you quickly build a full-text search index from a list of dictionaries and start searching immediately. Powered by tantivy (a Rust-based search engine), it delivers fast indexing and querying with minimal setup.

Features:

  1. Multiple search modes: ngram (substring matching), full-text (BM25), fuzzy (typo-tolerant), field-specific, and range queries.

  2. Sorting: single-field and multi-field sorting on numeric and datetime fields.

  3. Query language: Lucene-style syntax with boolean operators (AND, OR), range expressions (year:[2020 TO 2025]), and field-specific queries (author:smith).

  4. Two-layer disk cache: automatic caching of data freshness (L1) and query results (L2), with schema-aware invalidation.

  5. Cross-process safety: SQLite-backed atomic locking prevents concurrent index corruption.

  6. Pydantic configuration: all settings are validated pydantic models with IDE autocompletion support.

Install

sayt2 is released on PyPI, so all you need is to:

$ pip install sayt2

To upgrade to latest version:

$ pip install --upgrade sayt2

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

sayt2-0.1.2.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

sayt2-0.1.2-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file sayt2-0.1.2.tar.gz.

File metadata

  • Download URL: sayt2-0.1.2.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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 sayt2-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6b178593784bd7968de84fd6dac99f4998b610851c9b45066ed1fc5e7d77d48f
MD5 dfa1a7a4bcd419bc02efa4c75255df71
BLAKE2b-256 2ac59a15c52ed11477f8401591a286abf1b2a8c1e46194454101b4785c3b82ee

See more details on using hashes here.

File details

Details for the file sayt2-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sayt2-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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 sayt2-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b41d43e18e4230884cfa2d2b265358062ac4f7de988eee0887ead453cc411655
MD5 cec3c6dff8afb09db9587a959004f7be
BLAKE2b-256 6523fb0da0c983d092850e08ff2298227261a8c96ad51a26640de7fbd791743c

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