https://github.com/tooniez/fastapi-streamlit
📚 Full-stack application with a FastAPI backend and a Streamlit frontend
https://github.com/tooniez/fastapi-streamlit
fastapi python streamlit
Last synced: 4 months ago
JSON representation
📚 Full-stack application with a FastAPI backend and a Streamlit frontend
- Host: GitHub
- URL: https://github.com/tooniez/fastapi-streamlit
- Owner: tooniez
- License: mit
- Created: 2024-08-29T03:41:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-12T09:08:39.000Z (about 1 year ago)
- Last Synced: 2025-06-11T17:56:41.278Z (about 1 year ago)
- Topics: fastapi, python, streamlit
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Governance: .github/GOVERNANCE.md
Awesome Lists containing this project
README
# FastAPI Streamlit Stack
This repository contains a full-stack application with a FastAPI backend and a Streamlit frontend.
## Features
### Backend (FastAPI)
- [ ] RESTful API routes
- [x] CORS (Cross-Origin Resource Sharing) support
- [ ] OAuth authentication
- [ ] ORM integration with a database
### Frontend (Streamlit)
- [ ] User authentication (login to server)
- [x] Demonstration of GET requests to the API backend
- [ ] Demonstration of POST requests to the API backend
## Setup
### Prerequisites
- Python 3.9+
- Streamlit
- FastAPI
- Pytest
- Black
- Docker
### Docker Setup
```shell
docker compose up
```
### Backend Setup
1. Navigate to the `api` directory
2. Install dependencies:
```
pip install -r requirements.txt
```
4. Start the FastAPI server:
```
uvicorn server:app --reload
```
### Frontend Setup
1. Navigate to the `app` directory
2. Install dependencies:
```
pip install -r requirements.txt
```
3. Run the Streamlit app:
```
streamlit run streamlit_app.py
```
## Testing
- API and Streamlit tests: Run `make test`
## API Documentation
Once the backend server is running, you can access the API documentation at:
- Swagger UI: `http://localhost:8000/docs`
- ReDoc: `http://localhost:8000/redoc`
## License
Copyright © 2024 [tooniez](https://github.com/tooniez).
This project is [MIT](https://github.com/tooniez/fastapi-streamlit.git/blob/main/LICENSE) licensed.