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
metricfor Celsius (default)imperialfor Fahrenheitstandardtreated 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
ValueErroron request or parsing errors. - Relies on Open-Meteo geocoding to resolve city names to coordinates; ensure the city can be found.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
282e79a50edf28db24bc759a7835b15b684f3cd039b8f5ce9e60286e36a7184e
|
|
| MD5 |
bc9ce5649e01e33f145536ed7c145809
|
|
| BLAKE2b-256 |
f013b6766c64816931117152605ad46113670e1bf8fa1e0ae79622dca52a24dc
|
File details
Details for the file fast_free_weather-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fast_free_weather-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2142aec329a94dd0765c6014c77ec17d9a661ca9d827a69b9be4bd6eec33bc5c
|
|
| MD5 |
fc7ccc8478ca7a5dd63c2ad2053dc128
|
|
| BLAKE2b-256 |
a1fa89b28ffbae51c076985380ed7b061cff36dd5374230eaa3d0092958b9147
|