Skip to main content

aiohere

Asynchronous Python client for the HERE API

Based on herepy

GitHub Actions PyPi PyPi codecov Downloads

Installation

pip install aiohere

Usage

from aiohere import AioHere, WeatherProductType

import asyncio

API_KEY = ""


async def main():
    """Show example how to get weather forecast for your location."""
    async with AioHere(api_key=API_KEY) as aiohere:
        response = await aiohere.weather_for_coordinates(
            latitude=49.9836187,
            longitude=8.2329145,
            products=[WeatherProductType.FORECAST_7DAYS_SIMPLE],
        )
        lowTemperature = response["dailyForecasts"][0]["forecasts"][0]["lowTemperature"]
        highTemperature = response["dailyForecasts"][0]["forecasts"][0][
            "highTemperature"
        ]
        weekday = response["dailyForecasts"][0]["forecasts"][0]["weekday"]

        print(
            f"Temperature on {weekday} will be between {lowTemperature}°C and {highTemperature}°C"
        )


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())

Buy Me A Coffee

Release files for aiohere 2.2.0

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

Source distribution (sdist)

Source distribution for aiohere 2.2.0
File Size Uploaded
aiohere-2.2.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiohere 2.2.0
File Interpreter ABI Platform
aiohere-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / aiohere-2.2.0.tar.gz

Download URL aiohere-2.2.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
74dd9994e3f60af5e702f4ac534ade7d6ddeeea245fac9d5dc89bc29a92e83c6
BLAKE2b-256 checksum
How to use checksums
f7e60eba35b823ce72415a8e8dce5d65ae8b1d87912e191ebaa1ce8008d93446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.10

Release files / aiohere-2.2.0-py3-none-any.whl

Download URL aiohere-2.2.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14147b7f553ca0b5ea4d1afeb13430a785ba052ef6340c1a4940ed9efcaa96f1
BLAKE2b-256 checksum
How to use checksums
297f19d498f7189c782c8258ad5433a11c970383e4c1922cc5c183047c34a359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.10

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

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