Skip to content

gerrysworkbench/NWS-API-Connecting-to-SoCal-Airport-Wx-Stations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

KLAX High & Low Temps 🌤️✨

Get ready to slay the weather game with KLAX realness. This Python script fetches today’s highs and lows for Los Angeles International Airport (KLAX), delivering accurate and stylish updates straight from the National Weather Service API. Whether you’re jet-setting, planning your day, or just vibing with LA skies, this script has you covered—no worries, just the facts, with a touch of fun.

📋

Real-Time Weather Tea: Pulls live, up-to-date high and low temperatures directly from the National Weather Service API.

Day/Night Breakdown: Clearly separates daytime highs and nighttime lows for easy interpretation and better planning. Error Handling That Slays: If something goes wrong, the script keeps it classy with detailed error messages—no shade, just solutions. Receipts Included: Logs every script run in run_timestamps.txt, bec

🛠️ Prerequisites

Before diving into KLAX weather realness, make sure you’ve got the essentials:

Python 3.6 or higher installed on your system. Requests library for bash Copy code pip install requests 🚀 Getting Started Clone or Download the Repository:

bash Copy code git clone https://github.com/your-username/your-repo-name.git cd your-repo-name Set Up Your Config: Create a config.py file in the project directory with the following content:

python Copy code BASE_URL = "https://api.weather.gov" HEADERS = {

HEADERS = {

HEADERS =

HEADER

HEA "User-Agent": "WeatherScript/1.0 ([email protected])" } TIMEOUT = } TIMEOUT

} TIM 10

`` Replace [email protected] with your actual email address (the National Weather Service requires this—keep it professional).

Run the Script: Fire up your terminal and execute:

bash Copy code python KLAX_High_Low_Temperature.py 📝 Example Output When the script works its magic, here’s what you’ll see:

vbnet Copy code Fetching KLAX weather data... Today's high at KLAX: 85°F Tonight Today's low at KLAX: 65°F Timestamp saved: Timestamp saved: 2024-11-18 12:45:10

`` Additionally, a timestamp of every run is saved in run_timestamps.txt—because every execution deserves its moment in the spotlight.

🎨 Who’s It For?

Frequent Flyers: Plan your travels with KLAX weather at your fingertips. Fashionistas & Planners: Dress to impress and pack smart with precise forecasts. Weather Enthusiasts: Stay on top of LA’s ever-iconic skies. The Curious & Fabulous: Because knowing the vibe of the skies is always a mood.

🌈 License

This project is licensed under the MIT License. Use it, share it, and enjoy it!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages