Skip to content

app working - #5

Merged
KarandeepSingh258255 merged 1 commit into
mainfrom
Karan-apppy
Jul 9, 2026
Merged

app working#5
KarandeepSingh258255 merged 1 commit into
mainfrom
Karan-apppy

Conversation

@KarandeepSingh258255

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 9, 2026 15:34
@KarandeepSingh258255
KarandeepSingh258255 merged commit 9a1b1e5 into main Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a small Flask HTTP API endpoint that combines flight lookup and location-based news retrieval, plus adds local-development editor configuration and expands Python-related ignores.

Changes:

  • Added app.py Flask app with /flight/<flight_number>/news endpoint that orchestrates services.flight and services.news.
  • Added .vscode/settings.json to load .env into the Python terminal/debug environment.
  • Expanded .gitignore to ignore common Python artifacts and logs (and keeps .env ignored).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.

File Description
app.py New Flask route that fetches flight destination and returns related news articles as JSON.
.vscode/settings.json Configures VS Code to use .env for Python environment variables.
.gitignore Adds standard Python cache/bytecode/log ignores and keeps .env ignored.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app.py
Comment on lines +13 to +15
try:
destination = get_destination_from_flight(flight_number)
except RequestException:
Comment thread app.py
Comment on lines +27 to +28
if not destination.get("success"):
return jsonify({"success": False, "stage": "flight", **destination}), 404
Comment thread app.py
Comment on lines +30 to +32
try:
headlines = get_headlines_for_location(destination["lat"], destination["lon"])
except RequestException:
Comment thread app.py
Comment on lines +44 to +45
if not headlines.get("success"):
return jsonify({"success": False, "stage": "news", **headlines}), 502
Comment thread app.py


if __name__ == "__main__":
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants