needle-python
Needle client library for Python
Decision gist · record as of 2026-08-14
Yes, if you need semantic search and document indexing for a RAG pipeline and prefer a managed service over self-hosted infrastructure. The library is straightforward to use, has low install friction, and carries no security vulnerabilities. However, the aging maintenance status (no updates in months) and modest adoption (45 repository stars) suggest you should verify that Needle's API remains actively supported before committing to production use. Suitable for prototyping and moderate-scale applications; evaluate alternatives if you need active development or extensive customization.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires NEEDLE_API_KEY environment variable or explicit API key parameter; Python >=3.8 required.
- Low install friction with a single runtime dependency (requests).
- Maintenance status is aging—last commit was 2025-07-27, roughly 383 days after initial release, with modest repository activity (45 stars).
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this library with minimal restrictions, provided you retain the license notice.
last release 2025-07-27 (383 days) · last repo commit 2025-07-27 · 45 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 174,175 downloads/mo, #10,287 on PyPI
Alternatives
Verify before relying
pip install needle-python
from needle.v1 import NeedleClient
from needle.v1.models import FileToAdd
ndl = NeedleClient()
collection = ndl.collections.create(name="My Collection")
files = ndl.collections.files.add(
collection_id=collection.id,
files=[FileToAdd(name="doc.pdf", url="https://example.com/doc.pdf")]
)
results = ndl.collections.search(collection.id, text="query")- Whether the library's search performance scales well with large document collections or many concurrent requests.
- Current state of API stability and whether breaking changes are expected given the aging maintenance status.
- Whether FileToAdd and other model types support additional parameters beyond name and url for file ingestion.
What it is and what it does
needle-python is a client library that wraps the Needle API, a service for indexing documents and performing semantic search. It abstracts the REST API into Python objects and methods, allowing you to create collections, upload files (from URLs), wait for indexing, and retrieve semantically relevant context from your documents. The library is designed to integrate into RAG pipelines—you use it to extract relevant passages from your indexed documents, then feed those passages as context to an LLM (like OpenAI's GPT) to generate grounded answers.
The library depends only on requests for HTTP communication and supports Python 3.8 through 3.13. It reads your Needle API key from the NEEDLE_API_KEY environment variable by default, though you can pass it explicitly. The fact sheet shows the library is in Beta status, with modest but stable maintenance; it has not been updated recently but has no known vulnerabilities and a permissive MIT license.
Use it for
- Build a RAG system that indexes PDFs or web documents and retrieves relevant passages to answer user questions grounded in those documents.
- Create a knowledge base where users can upload files to a collection and search across them semantically without writing custom indexing logic.
- Prototype LLM applications that need to augment prompts with real document context, reducing hallucination by grounding answers in indexed material.
- Integrate document search into an existing Python application without managing your own vector database or embedding infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need semantic search and document indexing for a RAG pipeline and prefer a managed service over self-hosted infrastructure.
The library is straightforward to use, has low install friction, and carries no security vulnerabilities. However, the aging maintenance status (no updates in months) and modest adoption (45 repository stars) suggest you should verify that Needle's API remains actively supported before committing to production use. Suitable for prototyping and moderate-scale applications; evaluate alternatives if you need active development or extensive customization.
Install
needle-python on PyPI
Before you install
Low install friction with a single runtime dependency (requests). Maintenance status is aging—last commit was 2025-07-27, roughly 383 days after initial release, with modest repository activity (45 stars). No recent updates suggest the library is stable but not actively developed.
Requires NEEDLE_API_KEY environment variable or explicit API key parameter; Python >=3.8 required.
License in practice
MIT license (permissive) means you can use, modify, and distribute this library with minimal restrictions, provided you retain the license notice.
Quickstart
pip install needle-python
from needle.v1 import NeedleClient
from needle.v1.models import FileToAdd
ndl = NeedleClient()
collection = ndl.collections.create(name="My Collection")
files = ndl.collections.files.add(
collection_id=collection.id,
files=[FileToAdd(name="doc.pdf", url="https://example.com/doc.pdf")]
)
results = ndl.collections.search(collection.id, text="query")
Verify before relying
- Whether the library's search performance scales well with large document collections or many concurrent requests.
- Current state of API stability and whether breaking changes are expected given the aging maintenance status.
- Whether FileToAdd and other model types support additional parameters beyond name and url for file ingestion.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagerequests |
| Maintenance | Aging 383 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 174,175 / month, #10,287 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries :: Python Modules |
Evidence: needle_python-0.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “needle api python client”
- needle-pythonPython client library for the Needle API, enabling document indexing,…
- fuzzysearchFinds approximate substring matches in text or data with configurable…
- twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also h2ogpte · llama-index-core · langchain-graph-retriever · agent-framework-azure-ai-search · llama-index-vector-stores-lancedb · lightrag-hku · graph-retriever · llama-index-embeddings-azure-openai · ragstack-ai-knowledge-store · pyvespa