Python library to get weather from Google Search. No API keys required.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
pygoogleweather
pygoogleweather is a Python library to get weather information from Google Search. No API keys required.
Features
- Fetch current weather information for any city.
- Supports multiple languages.
- Convert temperature units between Celsius, Fahrenheit, and Kelvin.
- Get wind speed in km/h or mph.
Installation
You can install the library using pip:
pip install pygoogleweather
Usage
from google_weather.weather import get_current_weather
result = get_current_weather('Buenos Aires')
print(result)
# {'temperature': '24.0°C', 'humidity': '72%', 'wind': '34 kmh', 'condition': 'Mayormente soleado', 'location': 'Buenos Aires, Cdad. Autónoma de Buenos Aires'}
You can also specify the language, temperature unit, and wind unit:
print(get_current_weather('Buenos Aires', lang='it', temp_unit='F', wind_unit='mph'))
# {'temperature': '75.2°F', 'humidity': '72%', 'wind': '21 mph', 'condition': 'Per lo più soleggiato', 'location': 'Buenos Aires, Città Autonoma di Buenos Aires'}
print(get_current_weather('New York', lang='en'))
# {'temperature': '37.4°F', 'humidity': '40%', 'wind': '11 mph', 'condition': 'Mostly Cloudy', 'location': 'New York, NY'}
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 pygoogleweather-0.1.2.tar.gz.
File metadata
- Download URL: pygoogleweather-0.1.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d830ddc7481ad5bf5d3f43aedff3752ae3cd1a4827707e0725d11857ae1c9260
|
|
| MD5 |
ba603ca7412ce4e8859c776bf1894585
|
|
| BLAKE2b-256 |
a8997a9f1412ea97802ba6d8886eafc5e21f48af095d8a4fd2ee589bdd1ea57c
|
File details
Details for the file pygoogleweather-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pygoogleweather-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9348c7f03b2d527a677687779d94110d48f8b3ab48d1db458791d06593049fb5
|
|
| MD5 |
6b1012a2cc82126175df901d57e5faa8
|
|
| BLAKE2b-256 |
d50f643cf1daa16c9c8926d7af2a874cdd094d69ed09368368665509eae5c705
|