Skip to main content

Python bindings for Kronroe temporal graph database

Project description

kronroe (Python)

Python bindings for Kronroe via PyO3/maturin.

Quickstart

from kronroe import AgentMemory

memory = AgentMemory.open("./my-agent.kronroe")
memory.assert_fact("alice", "works_at", "Acme")
results = memory.recall("where does Alice work?", limit=10)
scored = memory.recall_scored("where does Alice work?", limit=10)
memory.assert_with_confidence("alice", "works_at", "Acme", 0.95, "user:notes")
print(results)
print(scored)

assert_fact uses default confidence (1.0) with no source provenance. Use assert_with_confidence(..., source=...) when you need explicit confidence/source metadata.

Local build

cd crates/python
python -m pip install maturin
maturin develop

Runtime validation

# Python runtime smoke test (builds local extension with cargo, then executes tests/runtime_smoke.py)
./scripts/run_runtime_smoke.sh

# Rust-side embedded-interpreter tests (runs without extension-module feature)
./scripts/run_rust_runtime_tests.sh

Optional feature toggles:

KRONROE_PY_FEATURES="hybrid uncertainty" ./scripts/run_runtime_smoke.sh
KRONROE_PY_RUST_TEST_FEATURES="hybrid uncertainty" ./scripts/run_rust_runtime_tests.sh

Publish flow

# Build wheel(s)
python3 -m maturin build --release -o dist

# Upload to TestPyPI (token auth)
python3 -m pip install twine
TWINE_USERNAME=__token__ \
TWINE_PASSWORD="pypi-your-testpypi-token" \
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

# Upload to PyPI (token auth)
TWINE_USERNAME=__token__ \
TWINE_PASSWORD="pypi-your-pypi-token" \
python3 -m twine upload dist/*

Recommended for CI/release automation: configure PyPI Trusted Publisher for this repository and publish from GitHub Actions without storing long-lived API tokens.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

kronroe-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

File details

Details for the file kronroe-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kronroe-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 34744202c1d361b6683f2d66b2ba04ec0171e3e2974df6b3e8d945c5e84102fc
MD5 6ae6e818fc7efd29884e13a8540cea2b
BLAKE2b-256 f273c920bb73e059db15695dd393d93858605f7c50342359416e27e906841f69

See more details on using hashes here.

Provenance

The following attestation bundles were made for kronroe-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl:

Publisher: python-publish.yml on kronroe/kronroe

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