This repository contains a full-stack application with a FastAPI backend and a Streamlit frontend.
- Backend: FastAPI with CORS + rate limiter;
/and/demo_postendpoints live. - Frontend: Streamlit demo with GET and POST buttons.
- RESTful API routes:
/(GET) and/demo_post(POST) - CORS (Cross-Origin Resource Sharing) support
- Rate limiting middleware
- Demonstration of GET requests to the API backend
- Demonstration of POST requests to the API backend
- Python 3.9+
- Streamlit
- FastAPI
- Pytest
- Black
- Docker
docker compose up- Navigate to the
apidirectory - Install dependencies:
pip install -r requirements.txt - Start the FastAPI server:
uvicorn server:app --reload
- Navigate to the
appdirectory - Install dependencies:
pip install -r requirements.txt - Run the Streamlit app:
streamlit run streamlit_app.py
- API and Streamlit tests: Run
make test
Once the backend server is running, you can access the API documentation at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc