Skip to content

LunaticMaestro/playground-sse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoC: Streaming API Response (Server and Client)

Details

server python (Starlette/ FastAPI) https://pypi.org/project/sse-starlette
client cURL, python, https://pypi.org/project/sseclient-py/
CAUTION: POSTMAN is not supported for streaming, however, response will return JSON of all the words instead of streaming. As there's a delay embedded in generating response you will observe a lag DONT attribute the lag as program being slow)

Bare Minimum Code

Checkout server/p1.py and client/p1.py

Playground

  1. Install deps.

    pip install -r requirements.txt
  2. Run server

    python server/p2.py
  3. Call GET Endpoint

    • Using cURL
      curl localhost:8000/get_words
    • Using Python
      python client/p2.py

Releases

No releases published

Packages

No packages published

Languages