Skip to main content

Weather Update Library

A simple Python library to fetch the weather updates for a specified location.

Installation

You can install the library using pip:

pip install weather-update

Usage

Before you can use the library, you need to set your OpenWeatherMap API key. The library will prompt you to enter the API key the first time you run it. The API key will be stored in a configuration file for subsequent use.

To get the weather updates for a location, use the get_weather function:

from weather_update.weather import get_weather

weather = get_weather("London,UK")
print(f"Weather in London: {weather['weather'][0]['description']}, {weather['main']['temp']}°C")

API Reference

  • get_weather(location: str) -> dict Get the weather updates for the specified location.

    Arguments

    • location: str -- location for which the weather updates are needed

    Returns

    A dictionary containing the weather updates for the specified location.

  • set_api_key()

Set the OpenWeatherMap API key in the configuration file. The library will prompt you to enter the API key if it has not been set already.

Metadata

Release files for weather-update 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weather-update 1.0.1
File Size Uploaded Provenance Actions
weather-update-1.0.1.tar.gz 2.4 kB Without provenance Details for weather-update-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for weather-update 1.0.1
File Interpreter ABI Platform Actions
weather_update-1.0.1-py3-none-any.whl Python 3 none any Details for weather_update-1.0.1-py3-none-any.whl

Total release size: 4.8 kB

Release files / weather-update-1.0.1.tar.gz

Download URL weather-update-1.0.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dd63a5c42502e2c15a5781effede837d04659db65d0be08614a5c7740c1ca122
BLAKE2b-256 checksum
How to use checksums
c38158c35cdb96ad6bc6885fc2865850edb28543307dd79385cf6706392287fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.9.13 Windows/10

Release files / weather_update-1.0.1-py3-none-any.whl

Download URL weather_update-1.0.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7c7f8e53ec9d4c2e6fcf93c7057f890fc793c586238085ec0c552fb9cc6a9c3
BLAKE2b-256 checksum
How to use checksums
18322c64a239e1c4ce6b2ffea5ef52457446942d27629a048e2969b9c6a7a4b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.9.13 Windows/10

Security for weather-update 1.0.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page