Build and Push / build (release) Successful in 52s
- Weather fetch now returns 7-day forecasts with UV index
- New /volatile/fetch/sun/{city} endpoint for sunrise/sunset
- New /volatile/fetch/air_quality/{city} endpoint for AQI and pollutants
- OpenMeteoProvider now implements AirQualityProvider interface
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
78 lines
1.7 KiB
Python
78 lines
1.7 KiB
Python
"""
|
|
External API clients for Library Desk.
|
|
|
|
This package contains clients for external web APIs, named by source.
|
|
Each provider implements a common interface for interoperability.
|
|
|
|
Weather providers (implement WeatherProvider):
|
|
- openmeteo: Open-Meteo (free, no key)
|
|
|
|
News providers (implement NewsProvider):
|
|
- nos: NOS.nl Dutch RSS (free, no key)
|
|
- bbc: BBC English RSS (free, no key)
|
|
|
|
Financial providers (implement FinancialProvider):
|
|
- alphavantage: Alpha Vantage (free tier with key)
|
|
|
|
Users can swap providers by configuring which implementation to use.
|
|
All providers return standardized response models from base.py.
|
|
"""
|
|
|
|
# Base classes and models
|
|
from .base import (
|
|
# Enums
|
|
WeatherCondition,
|
|
# Weather models
|
|
CurrentWeather,
|
|
DayForecast,
|
|
WeatherForecast,
|
|
GeoLocation,
|
|
SunTimes,
|
|
# Air quality models
|
|
AirQuality,
|
|
# News models
|
|
NewsItem,
|
|
NewsFeed,
|
|
# Financial models
|
|
StockQuote,
|
|
# Abstract providers
|
|
WeatherProvider,
|
|
AirQualityProvider,
|
|
NewsProvider,
|
|
FinancialProvider,
|
|
)
|
|
|
|
# Concrete implementations
|
|
from .openmeteo import OpenMeteoProvider
|
|
from .nos import NOSProvider
|
|
from .bbc import BBCProvider
|
|
from .news import AggregatedNewsProvider
|
|
from .alphavantage import AlphaVantageProvider
|
|
|
|
__all__ = [
|
|
# Enums
|
|
"WeatherCondition",
|
|
# Weather
|
|
"CurrentWeather",
|
|
"DayForecast",
|
|
"WeatherForecast",
|
|
"GeoLocation",
|
|
"SunTimes",
|
|
"WeatherProvider",
|
|
"OpenMeteoProvider",
|
|
# Air quality
|
|
"AirQuality",
|
|
"AirQualityProvider",
|
|
# News
|
|
"NewsItem",
|
|
"NewsFeed",
|
|
"NewsProvider",
|
|
"NOSProvider",
|
|
"BBCProvider",
|
|
"AggregatedNewsProvider",
|
|
# Financial
|
|
"StockQuote",
|
|
"FinancialProvider",
|
|
"AlphaVantageProvider",
|
|
]
|