Skip to main content

andnp-searchkernel

andnp-searchkernel is a source-agnostic Python library for building hybrid keyword, vector, and graph search systems. Applications map their native data to canonical Record values, choose the storage and provider adapters they need, and keep source-specific lifecycle logic outside the kernel.

It supports canonical record search, checkpointed record ingestion, optional local/Postgres/FAISS/provider integrations, and bounded federation across compatible search sources. Breaking changes are documented per release in docs/upgrading.md.

Install

The core package supports Python 3.13 and newer:

pip install andnp-searchkernel

Install optional integrations only when you need them:

pip install "andnp-searchkernel[faiss]"
pip install "andnp-searchkernel[pgvector]"
pip install "andnp-searchkernel[pgvector-psycopg3]"
pip install "andnp-searchkernel[huggingface]"
pip install "andnp-searchkernel[ollama]"
pip install "andnp-searchkernel[markdown]"

First local search

The local composition helper creates durable SQLite-backed stores. This small example uses a deterministic provider so it can run without downloading a model; replace it with a real provider for semantic retrieval.

import asyncio
from datetime import UTC, datetime
from pathlib import Path

from searchkernel import Record, build_local_record_kernel


class DemoEmbeddingProvider:
    model_name = "demo"
    dim = 2

    def embed(self, texts: list[str]) -> list[list[float]]:
        return [[1.0, 0.0] for _ in texts]


async def main() -> None:
    timestamp = datetime.now(UTC)
    composition = build_local_record_kernel(
        Path("records.db"),
        embedding_provider=DemoEmbeddingProvider(),
    )
    record = Record(
        workspace_id="demo",
        source_kind="notes",
        source_id="welcome",
        title="Welcome",
        body="Canonical records can be searched locally.",
        created_at=timestamp,
        updated_at=timestamp,
    )
    composition.keyword_store.index([record])

    outcome = await composition.kernel.search("canonical records", limit=5)
    for result in outcome.results:
        print(result.record.title, result.score)


asyncio.run(main())

The result is a RecordSearchOutcome. Each result retains the complete workspace/source identity and search provenance; degraded execution is reported through outcome.failures and outcome.diagnostics.

Documentation

Start with the documentation map to choose the right guide:

  • Getting started — install the package and build a first local index.
  • Core concepts — records, identity, ingestion, querying, stores, providers, and readiness.
  • Federated search — combine local or HTTP search sources with bounded concurrency and explicit partial-result diagnostics.
  • Performance and retrieval roadmap — developer-facing validation evidence, constraints, and future work.

Optional integrations

The core import surface does not require optional providers or backends. The available extras are faiss, pgvector, pgvector-psycopg3, huggingface, ollama, and markdown. See the getting-started guide for the selection rule and the federation guide for the HTTP source adapter.

Validation and releases

CI runs Ruff, Pyrefly, import-linter, the safe test suite, supported Python versions, and selected optional-import checks. Pgvector integration tests need Docker or SEARCHKERNEL_PG_DSN; real-embedding tests are outside the default offline gate. The performance roadmap records what those checks do and do not prove.

Merges to main with release-worthy Conventional Commits are released by the repository workflows. The package and runtime __version__ are checked against each other in CI and before semantic release.

License

MIT. See LICENSE.

Download files

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

Source Distribution

andnp_searchkernel-1.9.0.tar.gz (619.7 kB view details)

Uploaded Source

Built Distribution

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

andnp_searchkernel-1.9.0-py3-none-any.whl (291.8 kB view details)

Uploaded Python 3

File details

Details for the file andnp_searchkernel-1.9.0.tar.gz.

File metadata

  • Download URL: andnp_searchkernel-1.9.0.tar.gz
  • Upload date:
  • Size: 619.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for andnp_searchkernel-1.9.0.tar.gz
Algorithm Hash digest
SHA256 3aafd6fd808960c7e3d94c02e860896c00d5e861ea1eeb6c7ab4d2b849dc86e4
MD5 6d1d043c0d0702226c84fee4d9715903
BLAKE2b-256 33d61e293dadec499eae38cf00e346d244cc4f713ebcb5dd579ce5a12a1cea64

See more details on using hashes here.

Provenance

The following attestation bundles were made for andnp_searchkernel-1.9.0.tar.gz:

Publisher: publish.yml on andnp/andnp-searchkernel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file andnp_searchkernel-1.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for andnp_searchkernel-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f1f86fe7af8aaabc99f51c94d9ef4fddac3a3b79bfbfb17497463abe1f6d20e
MD5 54821848e919b8cdba4220cfe07b9bd8
BLAKE2b-256 87e7b9249cf818cf47302ef55cd649d4c75651e73a491f078788a9a7a535acb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for andnp_searchkernel-1.9.0-py3-none-any.whl:

Publisher: publish.yml on andnp/andnp-searchkernel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.11.0

2 files

1.10.0

2 files

1.9.1

2 files

This release

1.9.0 This release

2 files

1.8.1

2 files

1.8.0

2 files

1.7.0

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.8

2 files

0.15.7

2 files

0.15.6

2 files

0.15.5

2 files

0.15.4

2 files

0.15.3

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.14.0

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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