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 weather_sdk

Usage

  • First, initialize the SDK with your OpenWeatherMap API key: from weather_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

openweatherapi_sdk-0.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

openweatherapi_sdk-0.4-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file openweatherapi_sdk-0.4.tar.gz.

File metadata

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

File hashes

Hashes for openweatherapi_sdk-0.4.tar.gz
Algorithm Hash digest
SHA256 eb4c30c2de350af5870c91742622bd653c135d9c34ba236c7130c4341411ba5b
MD5 6c012e2b79bfa0afc22b747f38a97ae8
BLAKE2b-256 794fe60c32dff5cb8745da6cb0aca4b89e0bc7478199faed5107fae6290d51be

See more details on using hashes here.

File details

Details for the file openweatherapi_sdk-0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for openweatherapi_sdk-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a66753810f20b639ab926f7038aa649034e94614e0321600b6297091c8cd23aa
MD5 3048a1c5457efc2f3a40a6a6715be889
BLAKE2b-256 f84990bd88516f502fa6f83f1225fd384dde3d14dfc0348bc06ce076a2635cd1

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