Skip to main content

Pure-Python runtime for mounting and querying .knolo packs.

Project description

knolo

knolo is the pure-Python runtime for mounting existing .knolo packs and running deterministic lexical queries locally.

It is intentionally release-scoped for Phase 2:

  • local-first retrieval
  • deterministic lexical retrieval
  • no vector database
  • no embeddings on the default query path
  • no Python pack builder
  • no LangChain or LlamaIndex integration
  • no Node.js runtime dependency for mount/query

Packs are still built with @knolo/core in TypeScript, then mounted and queried from Python.

Install

From this package directory:

python -m pip install -e ".[dev]"

For a normal install, omit the extra:

python -m pip install .

Query

from knolo import mount_pack, query

pack = mount_pack("tests/fixtures/simple.knolo")
hits = query(pack, "alpha beta", top_k=5)

for hit in hits:
    print(hit.block_id, hit.score, hit.text)

You can also mount bytes directly:

from pathlib import Path
from knolo import mount_pack_from_bytes

pack = mount_pack_from_bytes(Path("tests/fixtures/simple.knolo").read_bytes())

Release Readiness

The package publishes from GitHub release events via Trusted Publishing. No secret-based PyPI credentials are required in CI.

Before a release, run:

python -m pytest
python -m build
python -m twine check dist/*

A manual upload fallback is still available when needed:

python -m twine upload dist/*

See RELEASE.md for the release checklist.

Fixture Regeneration

The committed fixture at tests/fixtures/simple.knolo is what tests use, so the test suite does not need Node.js at runtime.

To regenerate the fixture from the checked-in corpus, run the root helper script from the repo root:

node scripts/regenerate-python-fixture.mjs

The script reads tests/fixtures/corpus/intro.md, runtime.md, and other.md, then rewrites the committed binary fixture. Pass --check to verify that the committed bytes match the corpus without rewriting.

API

The public package exports:

  • mount_pack(source)
  • mount_pack_from_bytes(data)
  • query(pack, q, ...)
  • KnoloError
  • InvalidPackError
  • PackStats
  • PackMeta
  • Pack
  • QueryOptions
  • Hit
  • tokenize()
  • normalize()
  • __version__

Current Scope

  • No Python pack builder yet
  • No semantic reranking
  • No embeddings or vector database integration on the default path
  • No Node.js runtime dependency at query time
  • No LangChain or LlamaIndex adapters in this package

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

knolo-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

knolo-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file knolo-0.1.0.tar.gz.

File metadata

  • Download URL: knolo-0.1.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for knolo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f2998deef4f75221e8b224eb8b95397010df30bf6b3a0edfcc2459f4f29d526
MD5 0b897214cb79f6145a7698f5a7deceec
BLAKE2b-256 22f62add5635e49978d308b39bb7edfc6a6fd76cf01af0a10359e097cca35a35

See more details on using hashes here.

Provenance

The following attestation bundles were made for knolo-0.1.0.tar.gz:

Publisher: python-publish.yml on HiveForensics-AI/knolo-core

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

File details

Details for the file knolo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: knolo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for knolo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fae748492a730f48717caf186ef6ac2424f077c76b87b4e351c558db5f4b0ed6
MD5 dcddec8dceba7493dbaee9e88babb23a
BLAKE2b-256 5bebdee422babc28c8ac58e85d5fb71edd86481b5e2f83bea391310c93d03b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for knolo-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on HiveForensics-AI/knolo-core

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

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