text-generation
Hugging Face Text Generation Python Client
Decision gist · record as of 2026-08-14
No—do not install. The package is abandoned (archived repository, no commits since 2026-03-21), carries four known vulnerabilities, and receives no maintenance. While the install friction is low and the license is permissive, the lack of security patches and active support makes it unsuitable for production use. Consider using the official Hugging Face Hub library or InferenceClient from huggingface-hub directly instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running text-generation-inference instance or an active Hugging Face Inference Endpoint URL to connect to.
- Installation is straightforward with low friction—a pure Python wheel with three runtime dependencies (pydantic, aiohttp, huggingface-hub).
- However, the repository is archived and the package is abandoned; the last commit was 2026-03-21 and no maintenance is active, so security patches and compatibility updates are unlikely.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects without restriction.
last release 2024-03-22 (875 days) · last repo commit 2026-03-21 · 10,886 stars · archived
4 known vulnerabilities (OSV.dev, 2026-08-14) · 173,500 downloads/mo, #10,306 on PyPI
Alternatives
Verify before relying
pip install text-generation
from text_generation import Client
client = Client("https://YOUR_ENDPOINT.endpoints.huggingface.cloud")
response = client.generate("Why is the sky blue?")
print(response.generated_text)- Whether the package still works reliably with current Hugging Face Inference Endpoint APIs, given the abandoned status.
- Compatibility of the four known vulnerabilities (GHSA-j7x9-7j54-2v3h, GHSA-qq99-p57r-g3v7, PYSEC-2026-1965, PYSEC-2026-1966) with your use case and whether they are exploitable in your deployment context.
What it is and what it does
Text Generation is a Python client library for querying large language models hosted on Hugging Face's managed inference infrastructure. It wraps HTTP calls to text-generation-inference instances running on Hugging Face Inference Endpoints or the Hub, exposing both synchronous and asynchronous interfaces for generating text completions. The library handles request serialization via pydantic, HTTP communication through aiohttp, and model discovery via huggingface-hub.
You use it by instantiating a Client (or AsyncClient) with an endpoint URL, then calling generate() or generate_stream() to send prompts and receive completions. The library supports advanced generation parameters—sampling, repetition penalties, stop sequences, grammar constraints, and token-level details—and can stream tokens as they are produced rather than waiting for the full response.
Use it for
- Query a deployed Hugging Face Inference Endpoint model from Python without managing the underlying HTTP protocol.
- Stream text generation tokens in real time for interactive applications or live UI updates.
- Build async-first applications that query multiple models concurrently without blocking.
- Prototype language model applications against Hugging Face's managed inference without running local infrastructure.
- Access generation metadata (finish reason, token logprobs, top-k alternatives) for analysis or debugging.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No—do not install.
The package is abandoned (archived repository, no commits since 2026-03-21), carries four known vulnerabilities, and receives no maintenance. While the install friction is low and the license is permissive, the lack of security patches and active support makes it unsuitable for production use. Consider using the official Hugging Face Hub library or InferenceClient from huggingface-hub directly instead.
Install
text-generation on PyPI
Before you install
Installation is straightforward with low friction—a pure Python wheel with three runtime dependencies (pydantic, aiohttp, huggingface-hub). However, the repository is archived and the package is abandoned; the last commit was 2026-03-21 and no maintenance is active, so security patches and compatibility updates are unlikely.
Requires a running text-generation-inference instance or an active Hugging Face Inference Endpoint URL to connect to.
License in practice
Licensed under Apache-2.0 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects without restriction.
Quickstart
pip install text-generation
from text_generation import Client
client = Client("https://YOUR_ENDPOINT.endpoints.huggingface.cloud")
response = client.generate("Why is the sky blue?")
print(response.generated_text)
Verify before relying
- Whether the package still works reliably with current Hugging Face Inference Endpoint APIs, given the abandoned status.
- Compatibility of the four known vulnerabilities (GHSA-j7x9-7j54-2v3h, GHSA-qq99-p57r-g3v7, PYSEC-2026-1965, PYSEC-2026-1966) with your use case and whether they are exploitable in your deployment context.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <4.0,>=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespydanticaiohttphuggingface-hub |
| Maintenance | Abandoned 875 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 173,500 / month, #10,306 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | 4 GHSA-j7x9-7j54-2v3h, GHSA-qq99-p57r-g3v7, PYSEC-2026-1965, PYSEC-2026-1966 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: text_generation-0.7.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 › “hugging face text generation client”
- text-generationProvides a Python client to query text generation models hosted on…
- mlx-lmMLX LM loads, generates text with, fine-tunes, and quantizes large…
- langchain-huggingfaceConnects Hugging Face models and embeddings to LangChain…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also mlx-lm · ollama · spaces · langchain-huggingface · hf · transformers-stream-generator · optimum-onnx · pyspark-huggingface · llama-index-embeddings-huggingface