--- id: sqlalchemy-searchable version: "3.0.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # sqlalchemy-searchable — Provides fulltext search capabilities for declarative SQLAlchemy models. License: permissive · Maintenance: active · Downloads: 103.8K/mo ## What it is and what it does SQLAlchemy-Searchable integrates PostgreSQL's fulltext search engine directly into SQLAlchemy's declarative ORM layer, letting you mark model fields as searchable and query them using database-native text search operators. It bridges the gap between SQLAlchemy's abstraction and PostgreSQL's powerful search capabilities, avoiding the need for separate search infrastructure for many use cases. The package works by decorating your model classes and fields, then providing search methods that compile down to PostgreSQL fulltext queries. It requires PostgreSQL and depends on sqlalchemy and sqlalchemy-utils. Search is performed at the database level, making it efficient for large datasets, though it is limited to PostgreSQL and cannot be used with other database backends. Use it for: - Add search to a blog or content management system where posts need to be found by title or body text. - Implement user-facing search in a web application backed by SQLAlchemy without adding external search infrastructure. - Build product search in an e-commerce catalog where items are stored in a PostgreSQL database. - Create a searchable documentation or knowledge base indexed by PostgreSQL fulltext. - Add autocomplete or type-ahead search to forms querying a SQLAlchemy model. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds fulltext search capabilities to SQLAlchemy models using PostgreSQL's native search features. Yes, if you are using SQLAlchemy with PostgreSQL and need fulltext search without external infrastructure. The package is actively maintained, has no known vulnerabilities, and low install friction. Not suitable if you use a different database backend or need advanced search features beyond PostgreSQL's native capabilities. ## Install pip install sqlalchemy-searchable uv add sqlalchemy-searchable poetry add sqlalchemy-searchable ## Installing sqlalchemy-searchable Before you install: Low friction install with just two runtime dependencies (sqlalchemy and sqlalchemy-utils). The package is actively maintained with a recent release and no known vulnerabilities. License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install sqlalchemy-searchable from sqlalchemy_searchable import make_searchable from sqlalchemy import create_engine from sqlalchemy.orm import declarative_base Base = declarative_base() make_searchable(Base.metadata) Requires PostgreSQL database backend; does not work with other database systems. Verify before relying: - Whether search indexing is automatic on model changes or requires manual triggers. - Performance characteristics with large result sets or complex search queries. - Exact PostgreSQL version requirements beyond general compatibility. - How to configure which model fields are indexed for search. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 103.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlalchemy fulltext search, postgresql full text search orm, sqlalchemy text search, database model search, sqlalchemy postgres search, orm fulltext indexing, declarative model search, postgresql, fulltext-search, orm [View on SkillFed](https://skillfed.io/packages/sqlalchemy-searchable) · [View on PyPI](https://pypi.org/project/sqlalchemy-searchable/)