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.3.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.

openweatherapi_sdk-0.3-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openweatherapi_sdk-0.3.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 openweatherapi_sdk-0.3.tar.gz
Algorithm Hash digest
SHA256 453f394e887acd7f6e6e32c4faf3db5289cf16a067b28a4cf2f5467a3192d16c
MD5 a7278bb18ccc113262e156d1b926efe6
BLAKE2b-256 2f7e3aeaf19f96820550b88444c34e99b814db845da5274e84b60fe8fbadd2e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openweatherapi_sdk-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 11eaf4fe88e32ea04a24ae3f185fd70b8626b70a457ddf05a85a76fc5ecce7da
MD5 725ce4a08e21bb27be12ad7a4c475edb
BLAKE2b-256 5df15309e676230a446a435264f3ea8957290aacf71da3edbb1ef4069fd18fc1

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