AgriVisor - OpenWeather API Integration Library
A library for fetching weather data from OpenWeather APIs, designed for ease of use and to provide easy details
Features
- Current Weather - Get real-time weather data for any location
- Hourly Forecast - 4-day hourly weather forecast (96 hours)
- Daily Forecast - 16-day daily weather forecast
- Air Pollution - Current air quality and pollution data
- Geocoding - Convert city names to coordinates and vice versa
Installation
pip install agrivisor
Quick Start
from agrivisor import OpenWeatherClient
# Initialize the client with your API key
client = OpenWeatherClient(api_key="your_api_key_here")
# Get current weather for Dublin, Ireland
weather = client.get_current_weather(lat=53.3498, lon=-6.2603)
print(f"Temperature: {weather.temperature}°C")
print(f"Humidity: {weather.humidity}%")
print(f"Weather: {weather.weather_description}")
Key Methods:
All methods support both coordinate-based and city name-based lookups:
get_current_weather(lat, lon)orget_current_weather(city_name, country_code)- Get current weatherget_hourly_forecast(lat, lon, cnt)orget_hourly_forecast(city_name, country_code, cnt)- Get hourly forecast (4 days)get_daily_forecast(lat, lon, cnt)orget_daily_forecast(city_name, country_code, cnt)- Get daily forecast (16 days)get_air_pollution(lat, lon)orget_air_pollution(city_name, country_code)- Get air pollution datageocode(city_name, state_code, country_code, limit)- Convert city name to coordinatesreverse_geocode(lat, lon, limit)- Convert coordinates to city nameget_weather_snapshot(lat, lon)orget_weather_snapshot(city_name, country_code)- Get simplified weather for quick view dashboard or cardsis_raining(lat, lon)oris_raining(city_name, country_code)- Check if it's raining, returns a booleanget_weather_summary(lat, lon)orget_weather_summary(city_name, country_code)- Get human-readable summary in a text comma separated
API Endpoints Used
- Current Weather:
/data/2.5/weather - Hourly Forecast (4 days):
/data/2.5/forecast - Daily Forecast (16 days):
/data/3.0/onecall - Air Pollution:
/data/2.5/air_pollution - Geocoding:
/geo/1.0/directand/geo/1.0/reverse
Metadata
Release files for agrivisor 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agrivisor-1.0.4.tar.gz | 9.2 kB | Without provenance | Details for agrivisor-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agrivisor-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for agrivisor-1.0.4-py3-none-any.whl |
Total release size: 18.2 kB
Release files / agrivisor-1.0.4.tar.gz
| Download URL | agrivisor-1.0.4.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0ae73a3cddebb8515cfe0dabad5f3406e030b309d55d39e09f4135f3809c94b
|
|
BLAKE2b-256 checksum How to use checksums |
270e6fecf260245df4b7e1272e116ce60b1231264f12b6f8a1f078f5ddf8d17f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / agrivisor-1.0.4-py3-none-any.whl
| Download URL | agrivisor-1.0.4-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0319dabd32caaa1c35eec6032a12333d97067b7aa2fae8dcb9a7c62a67c927c3
|
|
BLAKE2b-256 checksum How to use checksums |
f21e4b9af3bda68be5f6e10e19ee08cdaec7a0e3eab506860d377e3f4e649ddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for agrivisor 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.