A concise, self-contained Python web project created for the Microsoft Hackathon. It includes a small Python web application and a static frontend page.
- Purpose: Demo web app and UI prototype for hackathon submission.
- Stack: Python (Flask or simple HTTP), HTML/CSS frontend.
app.py— Python server entrypoint (Flask or simple HTTP server).index.html— Single-page frontend served statically or opened directly in a browser.requirements.txt— Python dependencies.
- Python: 3.8 or newer (3.10+ recommended).
- OS: Windows (instructions below use PowerShell), Linux/macOS commands similar.
- Optional: an editor (VS Code) and Git for version control.
- Create a virtual environment and activate it:
python -m venv .venv
& .venv\Scripts\Activate.ps1- Upgrade pip and install dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txt- (Optional) If this is a Flask app, set environment variables for development:
$env:FLASK_ENV = "development"
$env:FLASK_APP = "app.py"Option A — Run as a Python web app (Flask or similar):
python app.py
# or for Flask built-in server
flask runThen open the URL shown in the terminal (commonly http://127.0.0.1:5000).
Option B — Open the static frontend directly:
- Open index.html in your browser (double-click or
File -> Open). - If the frontend expects API endpoints from
app.py, run Option A concurrently.
- If
app.pyexpects configuration (API keys, database URLs), set them as environment variables before running. - If CORS or fetch requests from
index.htmlfail when opened as a file, prefer serving the frontend via the Python app or a simple static server (e.g.,python -m http.server 8000).
app.py— server: routes, API handlers, and app startup.index.html— frontend UI, static assets may be alongside it.requirements.txt— freeze of Python packages used by the project.
- Use the virtual environment for development to avoid dependency conflicts.
- Open the project in VS Code and use the built-in debugger to step through
app.py. - Add a
.gitignoreto exclude.venv/,__pycache__/, and other artifacts.
- No automated tests are included yet. Add a
tests/folder and usepytestfor unit tests.
- "ModuleNotFoundError": ensure the virtual environment is activated and
pip install -r requirements.txthas been run. - "Port in use": change the port in
app.pyor useflask run --port 5001.
- Feel free to open issues or PRs. Add implementation notes and tests when possible.
- Add a
LICENSEfile to clarify reuse. For hackathon submissions, an MIT or Apache-2.0 license is common.