Skip to content

sede-open/github-copilot-demp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask & Streamlit App

This project integrates a Flask backend with a Streamlit frontend, using a shared Python virtual environment for dependency management and pytest for testing.

Project Structure

flask-streamlit-app/
├── backend/
│   ├── app.py
│   ├── requirements.txt
│   └── tests/
│       └── test_app.py
├── frontend/
│   ├── app.py
│   ├── requirements.txt
│   └── tests/
│       └── test_app.py
├── .venv/
└── README.md

Setup Instructions

  1. Create and activate the virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate
  2. Install dependencies for both backend and frontend:

    pip install -r backend/requirements.txt
    pip install -r frontend/requirements.txt

Running the Apps

Backend (Flask)

  1. Activate the virtual environment if not already active:
    source .venv/bin/activate
  2. Start the backend server:
    python3 backend/app.py
    The backend will run at http://localhost:5000/.

Frontend (Streamlit)

  1. Activate the virtual environment if not already active:
    source .venv/bin/activate
  2. Start the frontend app:
    streamlit run frontend/app.py
    The frontend will run at http://localhost:8501/.

API Integration

  • The frontend sends POST requests to the backend endpoint /api/data.
  • The backend receives the data and responds with a JSON object.

Testing

  • Tests are written using pytest and placed in the tests/ folders in both backend and frontend.
  • To run all tests:
    cd backend && pytest
    cd ../frontend && pytest

Notes

  • All dependencies are managed in a single virtual environment (.venv).
  • __pycache__ folders are auto-generated by Python for bytecode caching and can be ignored.
  • Make sure both backend and frontend servers are running for full integration.

About

test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published