A wrapper for the OpenWeatherMap API
Project description
Open Weather Mappy
A wrapper for the Open Weather Map API.
Installation
pip install owmpy
Usage
Import the API and make requests.
import asyncio
from os import getenv
from owmpy.current import Client
async def main():
# Get a weather token from openweathermap.org
async with Client(appid="YOUR_API_TOKEN") as weather:
response = await weather.get((0, 0))
print(response)
if __name__ == "__main__":
asyncio.run(main())
Optionally, you can supply your own ClientSession:
import aiohttp
weather = Client("YOUR_API_TOKEN", client_session=aiohttp.ClientSession())
Building
rm -r dist
python -m build
twine upload 'dist/*'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
owmpy-1.0.5.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
owmpy-1.0.5-py3-none-any.whl
(9.9 kB
view details)
File details
Details for the file owmpy-1.0.5.tar.gz.
File metadata
- Download URL: owmpy-1.0.5.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50ca4043e1d911eb229df64741f73af6bf9204fef23636dbf9cd7a790436c41f
|
|
| MD5 |
dbe2c33dd70f92d6cd17f2e609b359cc
|
|
| BLAKE2b-256 |
6b94ad18ba098e917dc3ddb1006408f429266a7130850a4eb99e599b587d4b45
|
File details
Details for the file owmpy-1.0.5-py3-none-any.whl.
File metadata
- Download URL: owmpy-1.0.5-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72d4a050a94e4d30afa9cef4d861903ccf0a85454dfd1c3f4320efff396c3c77
|
|
| MD5 |
bbf9316c6609dac9bb0a0b10384c3153
|
|
| BLAKE2b-256 |
b88664185f49c6a4e5cf2ae627ec4bdfbf1383eaf56a5dc300532651e4b5818a
|