Skip to content

A Python tool to fetch the latest METAR or SPECI reports from the Turkish Meteorology General Directorate (MGM). The tool retrieves the most recent report (METAR or SPECI) for a given station code and parses HTML to extract relevant information.

License

Notifications You must be signed in to change notification settings

hasanbahadirkoca/metar-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

METAR Fetcher

🇹🇷 Türkçe README için tıklayın

A Python tool to fetch the latest METAR or SPECI data for a given station code using data from Turkey's Meteorology General Directorate (MGM). The tool fetches the latest METAR or SPECI report, whichever is more recent.

Features

  • Fetches the latest METAR or SPECI data for a specific station.
  • Parses HTML content to extract METAR and SPECI information.

Installation

# Clone the repository
git clone https://github.com/hasanbahadirkoca/metar-fetcher.git
cd metar-fetcher

# Install dependencies
pip install requests

Usage

Example Code

from metar_fetcher import MetarFetcher

station_code = "LTCB"  # Replace with your desired station code
fetcher = MetarFetcher(station_code)

try:
    print("Latest METAR:", fetcher.fetch_latest_metar())
except Exception as e:
    print("Error:", str(e))

Output Example

Latest METAR: LTCB 281250Z 24004KT 9999 FEW020 SCT030 BKN100 15/10 Q1018

Contributing

Contributions are welcome! Please open an issue or submit a pull request with improvements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Python tool to fetch the latest METAR or SPECI reports from the Turkish Meteorology General Directorate (MGM). The tool retrieves the most recent report (METAR or SPECI) for a given station code and parses HTML to extract relevant information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages