skillfed

llama-stack-client

The official Python library for the llama-stack-client API

llama-stack-client v0.7.5 96.5K downloads/30d#13,211 on PyPI197
Permissive license MIT Active released

What it is and what it does

llama-stack-client is a Python SDK generated by Stainless that wraps the Llama Stack REST API. It provides both synchronous and asynchronous clients powered by httpx, with full type hints for all request parameters and response objects. The library handles authentication via API keys, supports streaming responses using Server-Sent Events, and includes automatic pagination for list endpoints.

The package is designed for developers building applications that need to interact with a running Llama Stack server—querying available models, making chat completions, or accessing other inference capabilities. It includes a CLI tool for direct server interaction and supports optional aiohttp backend for improved async concurrency. Type definitions enable IDE autocomplete and early error detection, while Pydantic models provide helper methods for JSON serialization and dictionary conversion.

Use it for:

  • Build a Python application that queries available models and makes chat completion requests to a Llama Stack server
  • Stream inference responses in real-time from Llama models using Server-Sent Events within a web service
  • Automate batch inference tasks asynchronously with the AsyncLlamaStackClient for concurrent model queries
  • Integrate Llama Stack inference into a CLI tool using the bundled llama-stack-client command-line interface
  • Paginate through large result sets automatically when listing models or other resources without manual page handling

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for interacting with Llama Stack REST API, providing type-safe synchronous and asynchronous access to inference, chat, and model management endpoints.

Yes, if you are building against a Llama Stack server. The library is actively maintained, has low install friction, carries no known vulnerabilities, and provides a well-typed interface with both sync and async support. The Python 3.12+ requirement is a hard constraint; if your project targets earlier versions, you cannot use this package. The pre-release status (--pre flag required) suggests API stability may still be evolving.

Install

llama-stack-client on PyPI

pip

pip install llama-stack-client

uv

uv add llama-stack-client

poetry

poetry add llama-stack-client

Installing llama-stack-client

Before you install

Low install friction with a pure-Python wheel distribution. Active maintenance with recent releases (18 days since last update). Requires Python 3.12+, which narrows compatibility to modern environments.

License in practice

MIT license permits commercial and private use with minimal restrictions. You may use, modify, and distribute this library freely provided you include the license notice.

Quickstart

pip install --pre llama_stack_client

from llama_stack_client import LlamaStackClient

client = LlamaStackClient()
models = client.models.list()

Requires Python 3.12 or later. Llama Stack server must be running and accessible at the configured endpoint.

Verify before relying

  • Whether the library works with Llama Stack server versions other than the current release
  • Performance characteristics under high concurrency with the default httpx backend versus aiohttp
  • Stability of the pre-release version tag (--pre flag required for installation)

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 15 — anyio, click, distro, fire, httpx, pandas, prompt-toolkit, pyaml, pydantic, requests, rich, sniffio, termcolor, tqdm, typing-extensions
Maintenance actively maintained — 18 days since the last release
Last repo commit
First released
Downloads 96,452/month — #13,211 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: llama_stack_client-0.7.5-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

llama stack python clientllama api python sdkllama inference client libraryllama chat completion apillama models python wrapperllama stack rest api clientllama async python client
llama-inferencerest-api-clientasync-support

More Python Modules packages