skillfed

assistant-stream

assistant-stream v0.0.36 91.3K downloads/30d#13,527 on PyPI11,656
Permissive license Active released

What it is and what it does

assistant-stream is a Python package that adds server-side streaming capabilities to Starlette-based backends, designed to work with the assistant-ui React library for building AI chat applications. It handles the server-side mechanics of streaming responses from language models or AI backends to connected clients in real time, complementing the React frontend's ability to display streaming messages as they arrive.

The package sits in the backend layer of an AI chat stack: you use it to stream responses from your LLM or AI service through a Starlette web server to the browser. It abstracts away the complexity of managing persistent connections and chunked response delivery, letting you focus on the business logic of generating chat responses. With only Starlette as a runtime dependency, it has minimal install friction and integrates into existing Python web applications.

Use it for:

  • Stream LLM responses in real time from a Python backend to a React chat interface without waiting for the full response to generate.
  • Build a production chat service where users see tokens or message chunks arrive progressively, improving perceived responsiveness.
  • Integrate with Vercel AI SDK or LangGraph backends to stream tool calls and structured outputs to the frontend as they execute.
  • Add streaming to an existing Starlette application without replacing the entire web framework or rewriting request handling.

Worth the install?

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

Provides server-side streaming support for AI chat applications built with Starlette, enabling real-time message delivery to React frontends.

Yes, if you are building a Python backend for an AI chat application using Starlette and need server-side streaming. The package has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. It is a focused tool for a specific use case (streaming responses to assistant-ui frontends) rather than a general-purpose library, so install it only if you are actually building that stack.

Install

assistant-stream on PyPI

pip

pip install assistant-stream

uv

uv add assistant-stream

poetry

poetry add assistant-stream

Installing assistant-stream

Before you install

Low friction install with a single runtime dependency (starlette). Active maintenance with recent releases; last commit 2026-08-14 and 11656 GitHub stars indicate ongoing development.

License in practice

MIT license permits commercial and private use with minimal restrictions; permissive treatment means you can integrate this into proprietary applications without licensing obligations.

Quickstart

pip install assistant-stream

from assistant_stream import StreamingResponse
from starlette.applications import Starlette

app = Starlette()

@app.route('/chat', methods=['POST'])
async def chat(request):
    return StreamingResponse(generate_stream())

Requires Python 3.10 or later (package specifies >=3.10,<4.0).

Verify before relying

  • Whether this package provides the complete streaming infrastructure or is a thin wrapper around Starlette's native streaming capabilities.
  • What specific streaming protocol or format (SSE, chunked transfer, etc.) is used for message delivery.
  • Whether integration with the React assistant-ui library requires additional setup beyond this package.

Package facts

License not declared (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — starlette
Maintenance actively maintained — 10 days since the last release
Last repo commit
First released
Downloads 91,292/month — #13,527 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: assistant_stream-0.0.36-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

server-sent events streamingai chat backend streamingstarlette async streamingreal-time chat responsesllm response streaming python
streamingai-chatstarlette

More Dynamic Content packages