xinference-client
Client for Xinference
What it is and what it does
xinference-client is a Python HTTP client for the Xinference model serving platform, allowing developers to programmatically launch, retrieve, and query language models running on a Xinference server. It wraps REST API calls into a Python-friendly interface, handling model lifecycle management (launch, get) and inference requests (chat completions with configurable generation parameters).
The package is built on standard HTTP libraries (requests, aiohttp) and integrates with pydantic for data validation. It's designed for scenarios where models are hosted on a separate Xinference server and accessed remotely, rather than for local model execution. The client abstracts away HTTP details and returns structured responses (chat completion objects with token counts, finish reasons, and assistant messages).
Use it for:
- Launch and query language models on a remote Xinference server from a Python application without direct model management.
- Build chatbot or conversational AI applications that delegate inference to a centralized Xinference deployment.
- Integrate model inference into data pipelines or batch processing workflows using a simple client API.
- Prototype or test different language models by swapping model names without changing client code.
- Monitor and manage model lifecycle (launch, retrieve state) programmatically across multiple applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for connecting to and managing Xinference model servers over HTTP, enabling programmatic access to launch, retrieve, and interact with language models.
Yes, if you are running a Xinference server and need a Python client to access it. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is not useful standalone—it requires a running Xinference server to connect to.
Install
xinference-client on PyPI
pip
pip install xinference-clientuv
uv add xinference-clientpoetry
poetry add xinference-clientInstalling xinference-client
Before you install
Low friction installation with a pure Python wheel and four common dependencies (requests, aiohttp, typing-extensions, pydantic). Actively maintained with recent releases; last commit 2026-07-31.
License in practice
Apache License 2.0 is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects without licensing concerns.
Quickstart
pip install xinference-client
from xinference_client import RESTfulClient as Client
client = Client("http://localhost:9997")
model_uid = client.launch_model(model_name="chatglm2")
model = client.get_model(model_uid)
model.chat("What is the largest animal?", chat_history=[], generate_config={"max_tokens": 1024})
Requires a running Xinference server accessible at the specified URL (e.g., http://localhost:9997).
Verify before relying
- Whether the package supports async/await patterns beyond aiohttp dependency presence.
- Supported Xinference server versions and compatibility guarantees.
- Whether model launch/retrieval operations have timeout or retry mechanisms.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — requests, aiohttp, typing-extensions, pydantic |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 204,341/month — #9,610 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xinference_client-3.1.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
ollamaProvides a Python client to interact with…
permissive · top 5,000 on PyPI
twentyc.rpcA client library for consuming 20c's RESTful…
permissive · top 15,000 on PyPI
cvpracA Python client library for the Arista…
permissive · top 15,000 on PyPI
anthropicProvides Python bindings to the Claude API,…
permissive · top 1,000 on PyPI
restflyRESTfly is a framework for building libraries…
permissive · top 15,000 on PyPI
ai21Python SDK for accessing AI21 Labs' language…
unclear · top 15,000 on PyPI
python-http-clientProvides a simplified Python interface for…
permissive · top 1,000 on PyPI
reka-apiProvides a Python client library for accessing…
permissive · top 15,000 on PyPI
langchain-nvidia-ai-endpointsIntegrates NVIDIA AI Foundation Models and chat…
permissive · top 5,000 on PyPI
ogx_open_clientProvides an OpenAPI-generated Python client for…
permissive · top 15,000 on PyPI