Skip to main content

A simple SDK for interacting with the OpenWeatherMap API

Project description

Weather SDK

A simple SDK for interacting with the OpenWeatherMap API.

Installation

You can install the package using pip:

pip install weatherapi_sdk

Usage

  • First, initialize the SDK with your OpenWeatherMap API key: from weatherapi_sdk.sdk import WeatherSDK

sdk = WeatherSDK(api_key="YOUR_API_KEY_HERE")

  • Get Weather by City Name You can retrieve weather data for a city by its name:

data = sdk.get_weather_by_city_name("London") print(data)

  • Get Weather by Coordinates You can retrieve weather data for a location using its latitude and longitude coordinates:

data = sdk.get_weather_by_coordinates(lat=51.51, lon=-0.13) print(data)

  • Replace "YOUR_API_KEY_HERE" with your actual OpenWeatherMap API key.

  • Make sure to replace "YOUR_API_KEY_HERE" with your actual OpenWeatherMap API key in the usage examples.

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

weatherapi_sdk-0.0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

weatherapi_sdk-0.0.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file weatherapi_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: weatherapi_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.0

File hashes

Hashes for weatherapi_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 286dc92b90e4e2c450fb74db8ad82f8311f5c54237e83efcca11aa55f863795c
MD5 f016029f4cd4eec23a911d17b5020dbe
BLAKE2b-256 abb66cf0fd8acd99ba90004061fc877414b64b066187a098cbeee57b6ff588a3

See more details on using hashes here.

File details

Details for the file weatherapi_sdk-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for weatherapi_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d12d072d131ec827c3feb270284bc47688d63cda0ae321e5395c37033bc40d5
MD5 22e1c1324d6fe3f4a655fd5935031bd7
BLAKE2b-256 211a1cd3ba7379b2dfae0c104b984171f100ea31e8295159021835aa1f85d91d

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