A simple and powerful Python wrapper for the Open-Meteo API.
Project description
ClimateX 🌦️
ClimateX is a simple, high-performance Python wrapper for the Open-Meteo API. It supports both synchronous and asynchronous requests, making it ideal for everything from data science scripts to real-time bots and web applications.
Features
- ⚡ Sync & Async Support: Built on top of
httpx. - 🔍 Geocoding API: Search for coordinates by city name.
- 🌡️ Current Weather: Get real-time weather details.
- 📅 7-Day Forecast: Hourly and daily weather variables.
- 🛡️ Type Safety: Fully typed with Pydantic models.
Local Development Setup
To set up ClimateX for local development, follow these steps:
-
Create a Virtual Environment:
python -m venv .venv
-
Activate the Environment:
- Windows:
.venv\Scripts\activate - Mac/Linux:
source .venv/bin/activate
- Windows:
-
Install in Editable Mode (with dev dependencies):
pip install -e ".[test, dev]"
Installation
pip install climatex
Quick Start
Synchronous Usage
from climatex import ClimateXClient
client = ClimateXClient()
# Search for a location
locations = client.search_location("London")
london = locations[0]
# Get current weather
weather = client.get_current_weather(london.latitude, london.longitude)
print(f"Current Temperature: {weather.temperature_2m}°C")
Asynchronous Usage
import asyncio
from climatex import ClimateXClient
async def main():
async with ClimateXClient() as client:
weather = await client.get_current_weather(51.5, -0.12)
print(f"Temperature: {weather.temperature_2m}°C")
asyncio.run(main())
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 climatex-0.1.0.tar.gz.
File metadata
- Download URL: climatex-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7003930aa4aa4bda5ac33904fc11bec45e44b38d8b121ccfda73c41745a163e
|
|
| MD5 |
4a7f581bddfb8d0db57c772e499f2822
|
|
| BLAKE2b-256 |
190c8fefbd2fd8d96fd1cbe71d88e7028ec54204edb9b6d99614b8966ff0c4d9
|
File details
Details for the file climatex-0.1.0-py3-none-any.whl.
File metadata
- Download URL: climatex-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daef379146678121366fb2cbbb02a2d97abe3f448acf8287ee98b9dc10bbb660
|
|
| MD5 |
08f5aad9e434251a2de19f06198d0534
|
|
| BLAKE2b-256 |
3394676af08e6a5ffda1ba6cc96333a94f77d6e96b66a982121718d3be801e2d
|