Skip to main content

A simple Python package to fetch weather data from the free Open-Meteo API.

Project description

fast_free_weather

A simple Python package to fetch weather data using the free Open-Meteo API (no API key required).

Installation

pip install fast_free_weather

Usage

from weather_fetch import WeatherFetch

wf = WeatherFetch()  # no API key needed for Open-Meteo
weather = wf.get_weather("Dhaka")  # defaults to metric units

print(weather["temperature"])
print(weather["description"])

Note: the PyPI package is fast_free_weather, but you import it as weather_fetch.

Units

  • metric for Celsius (default)
  • imperial for Fahrenheit
  • standard treated the same as metric

Testing

python -m pip install -e .
python -m pip install pytest
pytest

The tests mock the HTTP calls; no real API calls are made, so they run offline.

Notes

  • Uses a 10-second timeout and raises ValueError on request or parsing errors.
  • Relies on Open-Meteo geocoding to resolve city names to coordinates; ensure the city can be found.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_free_weather-0.1.2.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fast_free_weather-0.1.2-py3-none-any.whl (4.7 MB view details)

Uploaded Python 3

File details

Details for the file fast_free_weather-0.1.2.tar.gz.

File metadata

  • Download URL: fast_free_weather-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for fast_free_weather-0.1.2.tar.gz
Algorithm Hash digest
SHA256 282e79a50edf28db24bc759a7835b15b684f3cd039b8f5ce9e60286e36a7184e
MD5 bc9ce5649e01e33f145536ed7c145809
BLAKE2b-256 f013b6766c64816931117152605ad46113670e1bf8fa1e0ae79622dca52a24dc

See more details on using hashes here.

File details

Details for the file fast_free_weather-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_free_weather-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2142aec329a94dd0765c6014c77ec17d9a661ca9d827a69b9be4bd6eec33bc5c
MD5 fc7ccc8478ca7a5dd63c2ad2053dc128
BLAKE2b-256 a1fa89b28ffbae51c076985380ed7b061cff36dd5374230eaa3d0092958b9147

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page