Metadata-Version: 2.4
Name: sayt2
Version: 0.1.2
Summary: Search as you type on your own dataset.
Author-email: Sanhe Hu <husanhe@email.com>
Maintainer-email: Sanhe Hu <husanhe@email.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/MacHu-GWU/sayt2-project
Project-URL: Documentation, https://sayt2.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/MacHu-GWU/sayt2-project
Project-URL: Issues, https://github.com/MacHu-GWU/sayt2-project/issues
Project-URL: Changelog, https://github.com/MacHu-GWU/sayt2-project/blob/main/release-history.rst
Project-URL: Download, https://pypi.org/pypi/sayt2#files
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <4.0,>=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: AUTHORS.rst
Requires-Dist: tantivy<1.0.0,>=0.25.1
Requires-Dist: diskcache<6.0.0,>=5.6.3
Requires-Dist: pydantic<3.0.0,>=2.13.2
Provides-Extra: dev
Requires-Dist: rich<14.0.0,>=13.8.1; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest<9.0.0,>=8.2.2; extra == "test"
Requires-Dist: pytest-cov<7.0.0,>=6.0.0; extra == "test"
Provides-Extra: doc
Requires-Dist: Sphinx<8.0.0,>=7.4.7; extra == "doc"
Requires-Dist: sphinx-copybutton<1.0.0,>=0.5.2; extra == "doc"
Requires-Dist: sphinx-design<1.0.0,>=0.6.1; extra == "doc"
Requires-Dist: sphinx-jinja<3.0.0,>=2.0.2; extra == "doc"
Requires-Dist: furo==2024.8.6; extra == "doc"
Requires-Dist: pygments<3.0.0,>=2.18.0; extra == "doc"
Requires-Dist: ipython<8.19.0,>=8.18.1; extra == "doc"
Requires-Dist: nbsphinx<1.0.0,>=0.8.12; extra == "doc"
Requires-Dist: rstobj==2.0.0; extra == "doc"
Requires-Dist: docfly==3.0.3; extra == "doc"
Requires-Dist: jupyterlab==4.4.10; extra == "doc"
Provides-Extra: mise
Requires-Dist: PyGithub<3.0.0,>=2.8.0; extra == "mise"
Requires-Dist: httpx<1.0.0,>=0.28.0; extra == "mise"
Requires-Dist: tomli<3.0.0,>=2.0.0; python_version < "3.11" and extra == "mise"
Dynamic: license-file


.. image:: https://readthedocs.org/projects/sayt2/badge/?version=latest
    :target: https://sayt2.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/sayt2-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/sayt2-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/sayt2-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/sayt2-project

.. image:: https://img.shields.io/pypi/v/sayt2.svg
    :target: https://pypi.python.org/pypi/sayt2

.. image:: https://img.shields.io/pypi/l/sayt2.svg
    :target: https://pypi.python.org/pypi/sayt2

.. image:: https://img.shields.io/pypi/pyversions/sayt2.svg
    :target: https://pypi.python.org/pypi/sayt2

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/sayt2-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/sayt2-project

------

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://sayt2.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/sayt2-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/sayt2-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/sayt2-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/sayt2#files


Welcome to ``sayt2`` (Search As You Type) Documentation
==============================================================================
.. image:: https://sayt2.readthedocs.io/en/latest/_static/sayt2-logo.png
    :target: https://sayt2.readthedocs.io/en/latest/

``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 <https://github.com/quickwit-oss/tantivy-py>`_ (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:

Install
------------------------------------------------------------------------------

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

.. code-block:: console

    $ pip install sayt2

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade sayt2
