- Python version > 3.10 π
- Pip package manager π¦
- Streamlit π
-
- Clone the repository:
git clone https://github.com/pranjalpruthi/Streamlit-FastAPI.git
-
Navigate to the project directory:
cd Streamlit-FastAPI
Create a new Python virtual environment, or use conda/mamba to create a new environment:
-
Python Virtual Environment:
python -m venv apidemo source apidemo/bin/activate
-
Conda:
conda create -n apidemo python=3.10 conda activate apidemo
-
Mamba:
mamba create -n apidemo mamba activate apidemo
-
Install the required dependencies:
pip install -r requirements.txt
uvicorn main:app --reload
The backend server will be running at http://localhost:8000/docs# π.
Access the Swagger UI documentation:
Open your browser and visit http://localhost:8000/docs π. You will find the interactive API documentation powered by Swagger UI. Here, you can explore the available endpoints, test them, and view the response schemas.
(go to Swagger ui at localhost:8000/docs#/)
-
Navigate to the project directory (if not already there):
cd Streamlit-FastAPI
-
Start the Streamlit app:
streamlit run app.py
Open your browser and visit http://localhost:8501 π. You will see the Streamlit app interface, where you can interact with the API and visualize the data.
(go to streamlit ui at localhost:8501)
deactivate # deactivate the virtual environment
rm -rf /path/to/apidemo # delete the directory
conda env remove --name apidemo
mamba env remove --name apidemo
We welcome contributions from the community! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on GitHub.
This project is licensed under the AGPLv3 License Β©οΈ Feel Free to use.
FastAPI: https://fastapi.tiangolo.com/ π Streamlit: https://streamlit.io/ π SQLite: https://www.sqlite.org/ π Feel free to explore the documentation and official websites of the tools used in this project for further information and guidance.