Package Description
atmolib is a weather package that offers an easy and flexible way to its users to access and parse weather data in a pythonic way. The package uses the Open-Meteo Web APIs to fetch the weather data in its backend.
Installation
Install atmolib using pip:
$ python -m pip install -U atmolib --no-cache-dir
Quick Guide
atmolib offers a series of classes to its users which can be used for meteorology data extraction from Open-Meteo's Web APIs.
The classes along with their corresponding descriptions are mentioned as follows:
Weather
Provides extensive access to current, hourly, and daily forecast data, including temperature, dew point, weather conditions, soil temperature, visibility, and more.WeatherArchive
Enables retrieval of historical weather data, spanning hourly and daily records from 1940 till the present day.MarineWeather
Grants access to current, hourly, and daily marine weather forecast data, covering wave height, direction, and period, with a resolution of up to 5 kilometers.AirQuality
Supplies current and hourly forecasts for air quality metrics, including AQI, atmospheric gas concentrations, and UV index.
The package also provides users with some useful functions as a part of the package as mentioned below:
-
get_elevation
Extracts the elevation in meters(m) at the specified coordinates. -
get_city_details
Extracts the city details such as coordinates, country, timezone, etc. based on the specified city name.
Basic Usage
This guide provides the basic usage of the atmolib package and highlights some of the generally used methods. All the methods in the package are designed to be used with minimal arguments with default arguments primarily specified in all of them.
Weatherclass usage:
import atmolib as atmo
# 'forecast_days' is an optional argument and specifies the number
# of days for which forecast data is desired to be extracted.
weather = atmo.Weather(lat=26.91, long=75.54, forecast_days=10)
# Extracts a summary of weather forecast data.
weather.get_current_summary()
weather.get_hourly_summary()
weather.get_daily_summary()
# Extracts the current weather conditions.
weather.get_current_temperature()
weather.get_current_weather_code()
weather.get_current_cloud_cover()
weather.get_current_wind_speed()
weather.get_current_pressure()
weather.get_current_precipitation()
weather.get_current_relative_humidity()
# Extracts the hourly weather forecast data.
weather.get_hourly_temperature()
weather.get_hourly_visibility()
weather.get_hourly_wind_speed()
weather.get_hourly_precipitation_probability()
weather.get_hourly_soil_temperature()
# Extracts the daily weather forecast data.
weather.get_daily_temperature()
weather.get_daily_max_precipitation_probability()
weather.get_daily_max_uv_index()
weather.get_daily_max_wind_speed()
weather.get_daily_total_precipitation()
weather.get_daily_sunshine_duration()
-
WeatherArchiveprovides the same methods asWeatherclass as a part of a data range with slight modifications in some methods. -
MarineWeatherclass usage:
import atmolib as atmo
# 'forecast_days' is an optional argument and specifies the number
# of days for which forecast data is desired to be extracted.
# 'wave_type' refers to the type of waves for which marine
# weather data is desired to be extracted.
marine = atmo.MarineWeather(lat=0, long=0, wave_type='wind', forecast_days=7)
# Extracts a summary of marine weather forecast data.
marine.get_current_summary()
marine.get_hourly_summary()
marine.get_daily_summary()
# Extracts the current weather conditions.
marine.get_current_wave_height()
marine.get_current_wave_direction()
marine.get_current_wave_period()
# Extracts the hourly weather forecast data.
marine.get_hourly_wave_height()
marine.get_hourly_wave_direction()
marine.get_hourly_wave_period()
# Extracts the daily weather forecast data.
marine.get_daily_max_wave_height()
marine.get_daily_dominant_wave_direction()
marine.get_daily_max_wave_period()
AirQualityclass usage:
import atmolib as atmo
air = atmo.AirQuality(lat=26.91, long=75.54, forecast_days=7)
# Extracts a summary of air quality forecast data.
air.get_current_summary()
air.get_hourly_summary()
# Extracts the current weather conditions.
air.get_current_aqi()
air.get_current_pm2_5_conc()
air.get_current_pm10_conc()
air.get_current_uv_index()
air.get_hourly_dust_conc()
# Extracts the hourly weather forecast data.
air.get_hourly_uv_index()
air.get_hourly_uv_index()
air.get_hourly_pm2_5_conc()
air.get_hourly_pm10_conc()
air.get_hourly_aerosol_optical_depth()
Legals
atmolib is distributed under the MIT License. Refer to the LICENSE for more details.
NOTE:
atmolib is not affiliated, endorsed, or vetted by Open-Meteo. It's an open-source tool that uses Open-Meteo's publicly available meteorology APIs, and is intended for research and educational purposes only.
Call for Contributions
The atmolib project always welcomes your precious expertise and enthusiasm! The package relies on its community's wisdom and intelligence to investigate bugs and contribute code. We always appreciate improvements and contributions to this project.
Metadata
Release files for atmolib 0.1.1
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 | |
|---|---|---|---|---|
| atmolib-0.1.1.tar.gz | 28.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atmolib-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.8 kB
Release files / atmolib-0.1.1.tar.gz
| Download URL | atmolib-0.1.1.tar.gz |
|---|---|
| Size | 28.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2c5e46e668bd721a7eb96b8d16956bd57c631420f8158516feeb2a7c59b8a55
|
|
BLAKE2b-256 checksum How to use checksums |
af5d1c640900b47e49e62b27b2779818b576d3705765e66d752e6ecc814b7c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / atmolib-0.1.1-py3-none-any.whl
| Download URL | atmolib-0.1.1-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c5f8641506bcaba1b379b40b4e1b4aa76f1577b4366c78f64f2aa77cf84d4e5
|
|
BLAKE2b-256 checksum How to use checksums |
4b9915d1fc60cb67afe24848c4ed4931ea1e466b42b6700899cd80e04e96759b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for atmolib 0.1.1
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.