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, ...)KnoloErrorInvalidPackErrorPackStatsPackMetaPackQueryOptionsHittokenize()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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f2998deef4f75221e8b224eb8b95397010df30bf6b3a0edfcc2459f4f29d526
|
|
| MD5 |
0b897214cb79f6145a7698f5a7deceec
|
|
| BLAKE2b-256 |
22f62add5635e49978d308b39bb7edfc6a6fd76cf01af0a10359e097cca35a35
|
Provenance
The following attestation bundles were made for knolo-0.1.0.tar.gz:
Publisher:
python-publish.yml on HiveForensics-AI/knolo-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
knolo-0.1.0.tar.gz -
Subject digest:
0f2998deef4f75221e8b224eb8b95397010df30bf6b3a0edfcc2459f4f29d526 - Sigstore transparency entry: 1573388075
- Sigstore integration time:
-
Permalink:
HiveForensics-AI/knolo-core@a970700e218b0476d2eb9357c11665a6b2f4b48f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HiveForensics-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a970700e218b0476d2eb9357c11665a6b2f4b48f -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fae748492a730f48717caf186ef6ac2424f077c76b87b4e351c558db5f4b0ed6
|
|
| MD5 |
dcddec8dceba7493dbaee9e88babb23a
|
|
| BLAKE2b-256 |
5bebdee422babc28c8ac58e85d5fb71edd86481b5e2f83bea391310c93d03b58
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
knolo-0.1.0-py3-none-any.whl -
Subject digest:
fae748492a730f48717caf186ef6ac2424f077c76b87b4e351c558db5f4b0ed6 - Sigstore transparency entry: 1573388100
- Sigstore integration time:
-
Permalink:
HiveForensics-AI/knolo-core@a970700e218b0476d2eb9357c11665a6b2f4b48f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HiveForensics-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a970700e218b0476d2eb9357c11665a6b2f4b48f -
Trigger Event:
release
-
Statement type: