Skip to the content
hinny

Get started

Quickstart

Create a local database, index two notes, and find one by its text.

Install Hinny

Install the Rust crate from crates.io, the Node.js package from npm, or the Python package from PyPI. Python wheels support Python 3.11 or later on macOS and Linux on x86_64 and ARM64. The Node.js package includes native binaries for the same architectures on macOS and glibc-based Linux. Building the C library or HTTP server from source requires Rust 1.89 or later.

# In a uv project
uv add hinny

# Or in a virtual environment
pip install hinny

Index and search two notes

Save this as search.py. Hinny creates the database directory on the first run. Running it again replaces the same two keys.

Python
import hinny

db = hinny.Database("hinny-quickstart")
docs = db.namespace("notes", text="body", strings=["kind"])
docs.upsert(1, text="Renew the apartment lease", attrs={"kind": "task"})
docs.upsert(2, text="Bring the bicycle indoors", attrs={"kind": "reminder"})

for hit in docs.query(text="lease"):
    print(hit.key, hit.text["body"])

Run the query

In your uv project, run uv run python search.py. In an activated pip environment, run python search.py.

Output
1 Renew the apartment lease

Try searching for bicycle to retrieve the second note.