You are here: Home / LBN / Up2date / Data Science / BastionLinux 36 / python3-httpx-sse-0.4.0-1.lbn36.noarch

python3-httpx-sse-0.4.0-1.lbn36.noarch

Package Attributes
RPM  python3-httpx-sse-0.4.0-1.lbn36.noarch.rpm Architecture  noarch Size  22114 Created  2025/01/03 03:00:28 UTC
Package Specification
Summary Consume Server-Sent Event (SSE) messages with HTTPX.
Group Unspecified
License ZPL
Home Page https://pypi.org/project/httpx-sse
Description

httpx-sse

Consume Server-Sent Event (SSE) messages with HTTPX. Table of contents

Installation Quickstart How-To API Reference

Installation NOTE: This is beta software. Please be sure to pin your dependencies. pip install httpx-sse=="0.4.*"

Quickstart httpx-sse provides the connect_sse and aconnect_sse helpers for connecting to an SSE endpoint. The resulting EventSource object exposes the .iter_sse() and .aiter_sse() methods to iterate over the server-sent events. Example usage: import httpx from httpx_sse import connect_sse

with httpx.Client() as client: with connect_sse(client, "GET", "http:/localhost:8000/sse") as event_source: for sse in event_source.iter_sse(): print(sse.event, sse.data, sse.id, sse.retry)

You can try this against this example Starlette server (credit):

import asyncio import uvicorn from starlette.applications import Starlette from starlette.routing import Route from sse_sta

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(CompressedFileNames)  
rpmlib(PartialHardlinkSets)  
rpmlib(FileDigests)  
Provides
python-httpx-sse
python3-httpx-sse
python3.10-httpx-sse
python3.10dist(httpx-sse)
python3dist(httpx-sse)
Obsoletes
python-httpx-sse

Document Actions