Name | weather-update JSON |
Version |
1.0.1
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-02-10 09:27:47 |
maintainer | |
docs_url | None |
author | Ashutosh Krishna |
requires_python | >=3.9,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Weather Update Library
A simple Python library to fetch the weather updates for a specified location.
## Installation
You can install the library using pip:
```bash
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:
```python
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.
Raw data
{
"_id": null,
"home_page": "",
"name": "weather-update",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Ashutosh Krishna",
"author_email": "ashutoshbritish@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c3/81/58c35cdb96ad6bc6885fc2865850edb28543307dd79385cf6706392287fe/weather-update-1.0.1.tar.gz",
"platform": null,
"description": "# Weather Update Library\nA simple Python library to fetch the weather updates for a specified location.\n\n## Installation\n\nYou can install the library using pip:\n\n```bash\npip install weather-update\n```\n\n## Usage\n\nBefore 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.\n\nTo get the weather updates for a location, use the get_weather function:\n\n```python\nfrom weather_update.weather import get_weather\n\nweather = get_weather(\"London,UK\")\nprint(f\"Weather in London: {weather['weather'][0]['description']}, {weather['main']['temp']}\u00b0C\")\n```\n\n## API Reference\n\n* `get_weather(location: str) -> dict`\nGet the weather updates for the specified location.\n\n Arguments\n\n * `location`: str -- location for which the weather updates are needed\n\n Returns\n\n A dictionary containing the weather updates for the specified location.\n\n* `set_api_key()`\n\nSet 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.",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "1.0.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "18322c64a239e1c4ce6b2ffea5ef52457446942d27629a048e2969b9c6a7a4b6",
"md5": "03a8f430cfdb3f133dadfa3f1c9ce647",
"sha256": "e7c7f8e53ec9d4c2e6fcf93c7057f890fc793c586238085ec0c552fb9cc6a9c3"
},
"downloads": -1,
"filename": "weather_update-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "03a8f430cfdb3f133dadfa3f1c9ce647",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 2413,
"upload_time": "2023-02-10T09:27:49",
"upload_time_iso_8601": "2023-02-10T09:27:49.430041Z",
"url": "https://files.pythonhosted.org/packages/18/32/2c64a239e1c4ce6b2ffea5ef52457446942d27629a048e2969b9c6a7a4b6/weather_update-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c38158c35cdb96ad6bc6885fc2865850edb28543307dd79385cf6706392287fe",
"md5": "66b1f3f910a672af4d8f4fa21471961e",
"sha256": "dd63a5c42502e2c15a5781effede837d04659db65d0be08614a5c7740c1ca122"
},
"downloads": -1,
"filename": "weather-update-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "66b1f3f910a672af4d8f4fa21471961e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 2366,
"upload_time": "2023-02-10T09:27:47",
"upload_time_iso_8601": "2023-02-10T09:27:47.770849Z",
"url": "https://files.pythonhosted.org/packages/c3/81/58c35cdb96ad6bc6885fc2865850edb28543307dd79385cf6706392287fe/weather-update-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-10 09:27:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "weather-update"
}