Skip to main content

narsil-client

narsil-client calls a Narsil search server, or every node of a Narsil cluster, from Python 3.11 or later. It holds a typed method for every route that the server documents in its OpenAPI file, in a blocking form and in an async form with the same names.

pip install narsil-client
from narsil_client import NarsilClient

with NarsilClient("http://localhost:9876") as client:
    client.create_index({"name": "movies", "config": {"schema": {"title": "string", "year": "number"}}})
    client.insert("movies", {"id": "the-matrix", "document": {"title": "The Matrix", "year": 1999}})
    results = client.query("movies", {"term": "matrix"})
    print([hit.id for hit in results.hits])

AsyncNarsilClient takes the same settings, and each of its methods is a coroutine that you await under asyncio or trio.

When you pass a list of addresses, the client moves a read to the next node after a refused or broken connection, a timeout, or an answer of 502, 503, or 504. It moves a write only when the request never left the client or when the node answers NODE_NOT_READY, so the client never sends a second copy of a write that a node may have applied. Every failure raises NarsilError, under the code that the server sent or under a CLIENT_ code for a failure on this side.

The Python client guide covers the settings, the helpers, streaming a snapshot or an export, and the failover rules in full.

Metadata

Release files for narsil-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for narsil-client 0.1.0
File Size Uploaded Provenance Actions
narsil_client-0.1.0.tar.gz 66.9 kB With provenance Details for narsil_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for narsil-client 0.1.0
File Interpreter ABI Platform Actions
narsil_client-0.1.0-py3-none-any.whl Python 3 none any Details for narsil_client-0.1.0-py3-none-any.whl

Total release size: 160.7 kB

Release files / narsil_client-0.1.0.tar.gz

Download URL narsil_client-0.1.0.tar.gz
Size 66.9 kB
Tags Source
SHA-256 checksum
How to use checksums
15a963253bebb5dc7ffbe94502990d30e2dcefbc8b3ede7baf0d8101c7263494
BLAKE2b-256 checksum
How to use checksums
02f00c5833bbbf48c3f5eb5c09b8cbfa6f01c1a15da3e48f0a33567652ce3a06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / narsil_client-0.1.0-py3-none-any.whl

Download URL narsil_client-0.1.0-py3-none-any.whl
Size 93.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6af4bba8036894d1038ed21c0850ae553b3779ee25a7ec1626a0c0b33f1ec333
BLAKE2b-256 checksum
How to use checksums
38c942d973369acf56529bf7ebc419cd6dc86c79f9538e6dcf72ac1964a3fb2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for narsil-client 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for narsil_client-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page