A Python client for the Meteo Greece API (meteostations-gr-api)
Project description
Meteo Greece API Client
A simple, asynchronous Python client for the Meteostations GR Private API, which provides live meteorological data from Greek weather stations and city forecasts from meteo.gr.
This package is designed for easy integration with Home Assistant and other asynchronous Python applications.
Installation
pip install meteo-greece-api
Usage
import asyncio
from meteo_greece_api import MeteoGreeceClient
async def main():
async with MeteoGreeceClient() as client:
# Get all available stations
stations = await client.get_available_stations()
print(f"Found {len(stations.get('stations', []))} stations.")
# Get live data for a specific station (e.g., 'aggelokastro')
data = await client.get_station_data('aggelokastro')
print(data)
# Get all available cities for forecasts
cities = await client.get_cities()
print(f"Found {len(cities.get('cities', []))} cities.")
# Get forecast for a specific city (e.g., 12 for Athens)
forecast = await client.get_forecast(12)
print(forecast)
if __name__ == "__main__":
asyncio.run(main())
Features
- Asynchronous: Uses
aiohttpfor non-blocking network requests, ideal for Home Assistant integrations. - Context Manager: Supports
async withfor easy resource management. - Minimal Dependencies: Only requires
aiohttp.
Development
To set up the development environment:
# Clone the repository
git clone https://github.com/apo-mak/meteo-greece-api.git
cd meteo-greece-api
# Install dependencies including development ones
pip install -e ".[dev]"
# Run tests
pytest
Publishing to PyPI
To build and publish this package to PyPI, you can use the build and twine tools:
# Install build tools
pip install build twine
# Build the package (sdist and wheel)
python -m build
# Upload to PyPI (will prompt for your PyPI token)
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
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
File details
Details for the file meteo_greece_api-0.1.0.tar.gz.
File metadata
- Download URL: meteo_greece_api-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0332f17519dbb634fc4d07ac3a4ccc91a54e8565bfa87526aae0318ea38dc7bf
|
|
| MD5 |
9d63b30ea76b00df7262d735af2fb1df
|
|
| BLAKE2b-256 |
6d192dea45916059e5e186c51cfd7ea2e3246b4ae6d93984013edbf0e20fa54a
|
Provenance
The following attestation bundles were made for meteo_greece_api-0.1.0.tar.gz:
Publisher:
publish.yml on apo-mak/meteo-greece-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meteo_greece_api-0.1.0.tar.gz -
Subject digest:
0332f17519dbb634fc4d07ac3a4ccc91a54e8565bfa87526aae0318ea38dc7bf - Sigstore transparency entry: 2137858479
- Sigstore integration time:
-
Permalink:
apo-mak/meteo-greece-api@36d6e37d511357c2e9a1babfbff21d9212775332 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/apo-mak
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36d6e37d511357c2e9a1babfbff21d9212775332 -
Trigger Event:
push
-
Statement type:
File details
Details for the file meteo_greece_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: meteo_greece_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e598ca8266b1861599e4ad473fe2d30abf45735e919d37ac8a1045a8d6c71168
|
|
| MD5 |
a5078ee32679588997f1b66a10c84fd7
|
|
| BLAKE2b-256 |
52a245d84cbed0e55dce09d8249cfaa59e131accef4c52b71d5ae54e198221e1
|
Provenance
The following attestation bundles were made for meteo_greece_api-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on apo-mak/meteo-greece-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meteo_greece_api-0.1.0-py3-none-any.whl -
Subject digest:
e598ca8266b1861599e4ad473fe2d30abf45735e919d37ac8a1045a8d6c71168 - Sigstore transparency entry: 2137858496
- Sigstore integration time:
-
Permalink:
apo-mak/meteo-greece-api@36d6e37d511357c2e9a1babfbff21d9212775332 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/apo-mak
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36d6e37d511357c2e9a1babfbff21d9212775332 -
Trigger Event:
push
-
Statement type: