Skip to main content

Python library for storing and managing weather-related dataclasses from APIs.

Project description

WeatherCls

PyPI - Version

A Python library for storing and managing weather-related dataclasses from APIs.

Installation

pip install weathercls

Basic Usage

You can initialize the class manually or convert a Dictionary into the corresponding class using other libraries such as dacite.

from dacite import from_dict
from weathercls.weatherapicom import transform_to_snake_case
from weathercls.weatherapicom.forecast_weather.ForecastWeather import ForecastWeather

weather_forecast = {...}
weather_forecast = transform_to_snake_case(weather_forecast) # converts keys with dashes to underscores for better compatibility with dacite

forecast_weather = from_dict(data_class=ForecastWeather, data=weather_forecast)
print(forecast_weather)

List of Classes by Weather APIs

Name Package
weatherapi.com weathercls.weatherapicom

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

weathercls-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

weathercls-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file weathercls-1.0.0.tar.gz.

File metadata

  • Download URL: weathercls-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-49-generic

File hashes

Hashes for weathercls-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7d264308f4b017cbffb52574db647ecbe9d5d6456e008b4ab6d4633c56135097
MD5 5ec57f503da83767da87fa38fbbfe95a
BLAKE2b-256 ab413ab8f73af0ab500bb63330ffc682640a150a33e0b5b94b0b80934f1ea0a9

See more details on using hashes here.

File details

Details for the file weathercls-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: weathercls-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-49-generic

File hashes

Hashes for weathercls-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74bec04874d3e92f89f847b50a6b65142401a630063b9dafc596014e2cc25c8a
MD5 302b81512d20bc109b2614e52081ccc9
BLAKE2b-256 410d66f1c7993c6750a6fc03bc6cb61620c1f316163098ea056ab828d8886c73

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