Monitors endpoint response codes and pings Slack channels when servers go offline.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Pings endpoints and checks response code statuses.
import requests
import time
def check_endpoints(endpoints, webhook_url):
for url in endpoints:
try:
r = requests.get(url, timeout=5)
if r.status_code != 200:
notify_slack(webhook_url, f"API down! {url} returned code {r.status_code}")
except requests.exceptions.RequestException as e:
notify_slack(webhook_url, f"API timeout/error! {url}: {e}")
def notify_slack(webhook, message):
requests.post(webhook, json={"text": message})Real issues students hit during development and how to troubleshoot them fast.
Continue building your skills with similar projects.
Sleek weather dashboard using OpenWeather API with geolocation, 5-day forecast, and dynamic weather themes.
Personal budget tracker with transaction log, category breakdown, and Chart.js pie charts.
Movie discovery app with TMDB API, trending lists, search, and detail modals.