This project is a simple demonstration of streaming capabilities using FastAPI.
These instructions will get you up and running with a FastAPI server that you can interact with using a client script or curl.
Before you begin, ensure you have the following installed:
- Python 3.6+
- FastAPI
- Uvicorn (ASGI server for FastAPI)
To start the FastAPI server, run the following script:
$ ./go_uvicorn.shAfter starting the server, you can run the stream client to call the stream API, and see each words print out one by one as the stream of story arrives:
$ python get_stream_and_print.pyIf you prefer to use curl to test the stream, you can use the included script:
$ ./curl.shWhen you're done and you want to stop the FastAPI server, use the following script:
$ ./kill_uvicorn.sh