Skip to main content

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 aiohttp for non-blocking network requests, ideal for Home Assistant integrations.
  • Context Manager: Supports async with for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meteo_greece_api-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meteo_greece_api-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

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

Hashes for meteo_greece_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0332f17519dbb634fc4d07ac3a4ccc91a54e8565bfa87526aae0318ea38dc7bf
MD5 9d63b30ea76b00df7262d735af2fb1df
BLAKE2b-256 6d192dea45916059e5e186c51cfd7ea2e3246b4ae6d93984013edbf0e20fa54a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meteo_greece_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meteo_greece_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e598ca8266b1861599e4ad473fe2d30abf45735e919d37ac8a1045a8d6c71168
MD5 a5078ee32679588997f1b66a10c84fd7
BLAKE2b-256 52a245d84cbed0e55dce09d8249cfaa59e131accef4c52b71d5ae54e198221e1

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page